[Poppler-bugs] [Bug 19777] pdftops command line utility does not convert multiple-page-size documents correctly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 10 01:11:14 PST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=19777

--- Comment #14 from Adrian Johnson <ajohnson at redneon.com> 2010-12-10 01:11:12 PST ---
Testing setpagedevice on my printer it seems that if setpagedevice is called
after printing one side in duplex mode, the next page will not be on the second
side but instead start on a new sheet of paper.

If you want to call setpagedevice on each page to allow pages to be reordered
you could emit PS code that checks if the required page size is already
selected before calling setpagedevice.

Something like:

  currentpagedevice /PageSize get aload pop
  842 ne exch 595 ne and
  {
      <</PageSize [595 842]>> setpagedevice
  } if

I don't think save/restore is required because poppler reinitializes the gstate
parameters used at the start of each page.

I would also be interested to know why pdftops when used as a CUPS filter needs
tp emit setpagedevice directly instead of using the "%%IncludeFeature" style
comments as described at
http://www.cups.org/documentation.php/doc-1.4/spec-postscript.html and letting
CUPS insert the page select PS code based on the PPD file.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list