[gs-devel] Splitting Postscripfile

Joerg Baumann Joerg.Baumann at stud.informatik.uni-erlangen.de
Mon Aug 19 06:56:38 PDT 2002


On Mon, 19 Aug 2002, Russell Lang wrote:

> > I also tried using gs -sOutputFile=file%d ......
> This did not work with pswrite or pdfwrite in older
> versions.  I think the pswrite device now handles this, but
> I'm not sure about pdfwrite (ps2pdf).

Sadly, I doesn't work.

But I have another idea, albeit I'm not sure if it isn't too much
like a quick and dirty hack.
It tried it and it seems to work and doesn't need DSC compatible input:
Use a home-grown pdfselect

1. run the whole ps file through ps2pdf
2. use a little program which
   * deletes unwanted pages from the pdf pagetable
     (lines below << /Type /Pages /Kids [)
   * adjusts the page count: "] /Count <number>"
   (Be carefull not to change filesize, replace with space instead of
    actual deleting)
3. run pdfopt on this modified pdffile

I tried this with gnu gs7.05 and it did work, but it might not be portable
across different gs releases. Perhaps a modified pdfopt would be better.

bye
  joerg

"Sometimes when I'm talking, my words can't keep up with
my thoughts. I wonder why we think faster than we can speak."
  -- "Probably so we can think twice."
                                            (Calvin & Hobbes)






More information about the gs-devel mailing list