Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdftops filter produces invalid output #1801

Closed
michaelrsweet opened this issue Jun 26, 2006 · 1 comment
Closed

pdftops filter produces invalid output #1801

michaelrsweet opened this issue Jun 26, 2006 · 1 comment
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2.1
CUPS.org User: jpmg

pdftops/PSOutputDev.cxx:1161

writePSFmt("% Produced by xpdf/pdftops %s\n", xpdfVersion);

passes the string through a function in the printf family. Handling of the character sequence "% " is I believe specified to be undefined.

In practice, some operating systems map it to "% " (and thus no problem arises), but (for instance) when compiling on Solaris platforms, it is mapped to "", thus resulting in a bogus uncommented line near the top of the PS header.

I believe that

writePSFmt("%% Produced by xpdf/pdftops %s\n", xpdfVersion);

is both safe and correct on all platforms (I think it's ok to intersperse non-DSC comments within the DSC header)

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

FWIW, I opted to change the comment string to "%%Producer: xpdf/pdftops %s\n" to make it more parsable...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant