Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #806

Re: style of PostScript generated by pdf2ps?

From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: style of PostScript generated by pdf2ps?
Date 2012-07-16 11:24 +0100
Message-ID <MPG.2a6dfc3bcb8435ef989891@usenet.plus.net> (permalink)
References <CL-dne2qwa15Q57NnZ2dnUVZ7o-dnZ2d@brightview.co.uk> <a6i6p7Fn13U1@mid.individual.net>

Show all headers | View raw


In article <a6i6p7Fn13U1@mid.individual.net>, h.blischke@acm.org says...
 
> Ghostscript's ps2write device in essence outputs a linearized version of PDF 
> prepended by a procset that permit an ordinary level2 interpreter to 
> successfully render the stream.

That's only partially true these days, though it is still true up to a 
point.


> That implies reducing the input PDF or PS to 
> level2 compatible objects.

The conversion to leve 2 PostScript is what requires us to use level 2 
compatible objects, not the way the file is written.

If we ever do a ps3write then it will be able (foe example) to do 
shading dictionaries and CIDFonts. Currently these are converted to 
images and tyep 3 fonts respectively.


> One (weird?) feature of this driver is the attempt to tailor the output to 
> specific printer features such as paper size. 

Err, the paper size isn't printer-specific. We take the MediaBox from 
the PDF file and emit a PageSize media request in the PostScript. That's 
not specific to the printer, its specific to the PDF file, what the 
printer does with the request is up to the printer, it may select media 
from different trays, scale ther file etc.

I'm not sure what is weird about this, it makes sense to me.


> Therefore the global 
> BoundingBox reflects Ghostscript's default page size or, if specified, the 
> value fom the "-sPAPERSIZE=..." commandline switch.

The document BoundingBox ought to be the MediaBox from the PDF file or, 
as you correctly say, any overriding value such as the CropBox or 
PAPERSIZE, if specified. That's because these override what's in the PDF 
file.

You really shouldn't ever be seeing the GS default media size.

 
> I'd recommend to modify your script to grep through the generated PS stream 
> for the PageBoundingBox comments and use thoese values if specified.

Yes I agree with this, but I'm willing to look into the document level 
BoundingBox. I only ask for a bug to be entered so I have something to 
track.



				Ken

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

style of PostScript generated by pdf2ps? bugbear <bugbear@trim_papermule.co.uk_trim> - 2012-07-16 10:29 +0100
  Re: style of PostScript generated by pdf2ps? Helge Blischke <h.blischke@acm.org> - 2012-07-16 11:55 +0200
    Re: style of PostScript generated by pdf2ps? ken <ken@spamcop.net> - 2012-07-16 11:24 +0100
      Re: style of PostScript generated by pdf2ps? ken <ken@spamcop.net> - 2012-07-16 11:43 +0100
      Re: style of PostScript generated by pdf2ps? Helge Blischke <h.blischke@acm.org> - 2012-07-16 12:50 +0200
        Re: style of PostScript generated by pdf2ps? ken <ken@spamcop.net> - 2012-07-16 11:58 +0100
          Re: style of PostScript generated by pdf2ps? ken <ken@spamcop.net> - 2012-07-16 13:05 +0100
  Re: style of PostScript generated by pdf2ps? ken <ken@spamcop.net> - 2012-07-16 11:15 +0100

csiph-web