Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #804
| From | Helge Blischke <h.blischke@acm.org> |
|---|---|
| Newsgroups | comp.lang.postscript |
| Subject | Re: style of PostScript generated by pdf2ps? |
| Followup-To | comp.lang.postscript |
| Date | 2012-07-16 11:55 +0200 |
| Message-ID | <a6i6p7Fn13U1@mid.individual.net> (permalink) |
| References | <CL-dne2qwa15Q57NnZ2dnUVZ7o-dnZ2d@brightview.co.uk> |
Followups directed to: comp.lang.postscript
bugbear wrote: > This is (in fact) just the output of the pwwrite driver in GS. > > This has changed: > > The older driver generated stuff like this > > %!PS-Adobe-3.0 > %%Pages: (atend) > %%BoundingBox: 0 0 90 85 > %%HiResBoundingBox: 0.000000 0.000000 90.000000 85.000000 > %............................................. > %%Creator: GPL Ghostscript 900 (pswrite) > %%CreationDate: 2012/07/16 10:18:24 > %%DocumentData: Clean7Bit > %%LanguageLevel: 2 > %%EndComments > > The newer driver: > > %!PS-Adobe-3.0 > %%BoundingBox: 0 0 612 792 > %%Creator: GPL Ghostscript 904 (ps2write) > %%LanguageLevel: 2 > %%CreationDate: D:20120713171249+01'00' > %%Pages: 1 > %%EndComments > > The %%BoundingBox comment in the new output is incorrect, > or at least deferred in a very unhelpful way; *this* > occurs later on... > > %%Page: 1 1 > %%PageBoundingBox: 0 0 198 198 > > Which is the "true" size. Indeed, every box (including media > and crop) in the driving PDF is 198x198, so th1 612x792 > numbers in the BoundingBox comment are just defaults. > > This has caused me trouble, since I had a script that was > using the BoundingBox comments as the size > of the image represented by the PostScript > (which was always a single page in my context). > > BugBear 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 implies reducing the input PDF or PS to level2 compatible objects. One (weird?) feature of this driver is the attempt to tailor the output to specific printer features such as paper size. Therefore the global BoundingBox reflects Ghostscript's default page size or, if specified, the value fom the "-sPAPERSIZE=..." commandline switch. Specifying "-dSetPageSize=true" for the ps2write device forces the media of crop (if present) box for every page to be reflected both in a setpagedevice dictionary and in a PageBoundingBox comment. I'd recommend to modify your script to grep through the generated PS stream for the PageBoundingBox comments and use thoese values if specified. Helge
Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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