selecting pages from PostScript

Narayan S. Raja raja at bombay.cps.msu.edu
Thu Jan 17 19:26:52 AEST 1991


In article <1091 at ecicrl.UUCP>, (Chris Lewis) writes:
< In article <1991Jan12.194650.25292 at starnet> (Mark Zellers) writes:
< >In article <1991Jan10.171621 at madmax> (Kenstir) writes:

< >>Is it possible for a filter to select only certain pages
< >>from a PostScript document?  I have a huge document
< >>(thanks, OSF/Motif) which I need to print in small chunks
< >>so as not to offend the community at large by hogging
< >>the printer.
< 
< >It depends entirely on whether the file you are working with is an
< >Encapsulated PostScript file with the appropriate %%Page comments.  If
< 
< Slight mistake Mark, you meant "conformant with the document structuring
< conventions postscript file".  EPS files are files for pictures for enclusion
< in other documents, and hence don't have multiple pages - they're essentially
< includable images.
< 
< psxlate in the psroff distribution can be modified quite simply to handle
< this for conformant documents.


In fact, if you have the `Transcript' filters
(which you probably do), you can do it quite 
simply using psrev:

  "psrev -s 23,65-69,81 file.ps | lpr"

will print pages 23,65-69, and 81 on your
default printer.  Check the psrev man page.

This will work with conformant documents.

If your document was produced by dvi2ps/dvips
you're out of luck.  However if you feel like
some PostScript hacking you can put

   %!PS-Adobe-1.0

at the top of your PostScript document, and

   %%Trailer

at the end.  Now psrev will at least not reject
the document.  PostScript hacking is required.


Narayan Sriranga Raja.



More information about the Comp.unix.questions mailing list