Duplex Postscript - Create a New Page

Is there an easy way to get the postscript page into a new physical page to not insert a blank page?

eg. Let's say I have a PS document with 10 postscript pages that need to be printed in different packages of documents:

1 - Physical Page 1 Front

2 - Physical Page 1 Backside

3 - Physical Page 2

4 - Physical Page 3 Front side

5 - Physical Page 3 Backside

6 - Physical Page 4 Front

7 - Physical Page 5

8 - Physical Page 6 Front side

9 - Physical Page 7 Front

10 - Physical Page 7 Backside

I could set the whole file as duplex and insert dummy pages after pages 3,6,7 and 8, but I would like to avoid this, because our printers are behind the display, not the physical page.

I hope for a simple PS syntax that matches the "Force to front page".

+4
source share
2 answers

Try disabling duplex and immediately return to where you could insert a blank page.

<< /Duplex false >> setpagedevice << /Duplex true >> setpagedevice 

setpagedevice implicitly calls erasepage and initgraphics (so use it after the corresponding showpage ), however, the PostScript language reference manual states:

When the device is activated, the duplex device always prints the first page on a new sheet of media; upon deactivation, it automatically delivers the last sheet of media if it was printed on only one side.

So, if this works, it should save the showpage , but still display the pages correctly.

+4
source

This may be far-fetched, but you can change the behavior of the showpage , and then program whatever you want.

 % before the first -showpage- /pageCount 0 def % redefinition of 'showpage' /showpage { showpage /pageCount pageCount 1 add def % add page checking here, and whatever logic you want % just call another showpage to create an empty one } bind def % 'bind' keeps old showpage unaltered, avoiding recursion 

This is an option when it is impossible to disable duplex, as dreamlax showed in his answer.

0
source

All Articles