[gs-bugs] [Bug 692250] Add -sPages option

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Thu Jun 2 07:42:59 UTC 2011


http://bugs.ghostscript.com/show_bug.cgi?id=692250

--- Comment #4 from Ken Sharp <ken.sharp at artifex.com> 2011-06-02 07:42:58 UTC ---
Having looked at the IRC log, I think the requested behaviour can be achieved
in 2 different ways.

1) Use of a custom EmdPage, which only transfers the raterised data to the
output if a particular criterion is met. You can program this any way you want,
but it requires some PostScript. I'm not sure this will work reliably with
pdfwrite, but I *think* it does.

2) The PDF interpreter is capable of extracting an arbitrary page from the
document, which is how FirstPage and LastPage work now, as well as the regular
page rendering in fact. You can trivially write PostScript code which will
extract pages as required, in any order, and send them to the device. This
*will* work reliably with pdfwrite. I did this for someone on
comp.lang.postscript some time back to take groups of n pages from a PDF file,
trim them to a given size, and output each page to pdfwrite.

For PostScript input this is not possible in some cases, as later pages can
depend on the content of earlier pages, unless the file is DSC compliant. For
PCL there isn't any way to find a page without interpreting the data (unless
I'm mistaken ?) And again I think its possible that for example bitmap fonts
can be declared on one page, and used on later pages. So this probably wouldn't
be a useful feature for those languages (and for PostScript you can use the
EndPage trick, though you might have to process the file multiple times)

Sorry I wasn't around on irc at the time to explain this stuff, but I don't
think this is worthy of an enhancement myself.

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list