in reply to create ps file with PostScript::Simple - cannot print it out?

I tried to run your script, but I get this warning:

"EPS must contain a BoundingBox at line 6"

See: Cropping a postscript file and How do I figure out the bounding box(BoundingBox) for an encapsulated postscript file

  • Comment on Re: create ps file with PostScript::Simple - cannot print it out?

Replies are listed 'Best First'.
Re^2: create ps file with PostScript::Simple - cannot print it out?
by cta (Acolyte) on Jul 16, 2008 at 21:37 UTC
    That's weird!! Because I don't see any warning.
    Besides, the eps file does contain the BBox.
    If you do
    my ($hx1, $hy1, $hx2, $hy2)= $e->get_bbox(); print " bbox coordinates ($hx1, $hy1, $hx2, $hy2) \n";
    you'll see its coordinates.
      Weird? No. I used an EPS that I've had for awhile. Evidently, it's corrupt. I tried your EPS, and yes there's a bbox. Now it comes back with "unknown option -S". Sorry.

      Update: changed -S to -H and got "lpr: success".

      Update2: changed system("lpr -H server -P printerN headps.ps) == 0 or die $!;

      to this:

      system("lpr -H server -P printerN headps.ps) or die $?;

        I used -H instead to -S like you said but I got this error :
        Died at C:/Documents and Settings/workspace/Printing/new.pl line 17.
        I think that the ps file created has been corrupt, not the eps file . So that's why when it's sent to the printer, it cannot be printed.
        But I don't know how to fix it :(