Re: passing arguments through from pdf2ps

Ken Sharp <[email protected]> Tue, 06 Nov 2018 08:35:58 +0000
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <[email protected]>
At 01:25 06/11/2018 +0000, [email protected] wrote:

>I'm having trouble with duplex printing when converting a file with
>pdf2ps.  The pdf2ps man page seems to suggest that "options" are passed
>to "gs".  I have been running pdf2ps with "-dDuplex", but this doesn't
>seem to be working.

It will be, but it will do nothing useful with high level output. BTW if 
you want to talk to us on IRC then its best to try European office hours


>Some background, I print postscript files direct with "lpr" on OpenBSD,
>which doesn't support forced duplexing.  However, it seems to work fine
>with postscript that specifies duplexing.  I'm a little fuzzy on ps, so
>apologies if I'm way off-base...

The PostScript output from the ps2write device is deliberately 
device-independent. That is it will not request device-dependent features 
(such as duplex). When the input is a PDF file it can't anyway, because PDF 
has no such features in the format.

If you want to add device-specific code to the output of ps2write you can 
use the PSDocOptions and PSPageOptions features. Anything added to the 
PSDocOptions will be emitted in the document setup portion of the 
PostScript program, and anything added to the PSPageOptions will be added 
to every page setup portion of the PostScript program.

This allows users to mimic the kind of setup often seen in output from 
PostScript drivers such as the Microsoft one. Eg:

[{%%BeginFeature: *MirrorPrint False
<</MirrorPrint false>> setpagedevice
%%EndFeature
} stopped cleartomark


                     Ken