[gs-devel] Splitting Postscripfile

Russell Lang gsview at ghostgum.com.au
Mon Aug 19 04:01:47 PDT 2002


Jonny,  

The common way to select pages from a PostScript file is to 
rely on the Document Structuring Convention (DSC) comments
to indicate page boundaries.  If the pages are independent 
(i.e. %%PageOrder: Special  is NOT used), then you can 
reorder the pages.

psselect relies on the PostScript files having correct DSC 
comments, and on the pages being independent. 

The default settings for the Windows PostScript printer 
driver produces pages that are not independent. If you have 
one of these, you can't use psselect to extract pages 
(unless you only select pages 1..n, and not 1, 3, 5 etc.).  
You can change the printer drivers settings to Optimise for 
Portability, but you may not have control over every 
computer that sets print jobs.    

For output from Linux, conformance to the DSC depends on 
the program which wrote the PostScript.      

If the PostScript doesn't conform to the DSC (even though 
it may claim to do so), then you can't extract pages with 
psselect.  Your only option is to use a full PostScript 
interpreter.  

Russell


To:             	gs-devel at ghostscript.com
From:           	jonny.axelsson at systeam.se
Subject:        	[gs-devel] Splitting Postscripfile
Date sent:      	Mon, 19 Aug 2002 08:18:16 +0200

> Hello
> 
> I don't know if this is the right list of asking this
> question but i'll make a try. I made a script in linux were i
> print a document to a network printer and when it gets to the
> server it is run through my script. There i want to split up
> the printjob in seperate pages and then each page is either
> faxe'd, emailed or printed based on the content on each page.
> But there is one thing that a cant get to work and that is
> splitting the page up in on ps file for each page. the first
> page works fine but when it get to the rest something seems to
> be missing from the page becouse i cant convert it to pdf file
> that i want to mail. I use the command psselect to split the
> printjob up and then ps2pdf to convert to pdf. 
> 
> Can anyone tell me if there is some better way of doing this
> or if it just can't be done. 

> 
> Thanks.
> 
> \Jonny Axelsson
> 
> 
> 
> _______________________________________________
> gs-devel mailing list
> gs-devel at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-devel


Russell Lang                   gsview at ghostgum.com.au
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/





More information about the gs-devel mailing list