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

Printing an image to a Postscript printer generates empty sheet #26

Closed
zdohnal opened this issue Mar 14, 2023 · 2 comments
Closed

Printing an image to a Postscript printer generates empty sheet #26

zdohnal opened this issue Mar 14, 2023 · 2 comments

Comments

@zdohnal
Copy link
Member

zdohnal commented Mar 14, 2023

Hi,

I was dealing with CUPS upstream test suite which we run in Fedora 38 (libcupsfilters 2.0b4) and found out an empty sheet of paper is printed out if a user has a postscript driver and wants to print a JPEG file.

Input file: testfile.jpg.txt
Job log: job_log.txt
PPD file: north-fiile.ppd.txt
Output file: ps.txt

The suspicious lines in logs are:

Mar 14 16:53:52 fedora cupsd[24030]: [Job 56] cfFilterImageToPDF: Before scaling: xppi=0, yppi=0, zoom=1.00
Mar 14 16:53:52 fedora cupsd[24030]: [Job 56] cfFilterImageToPDF: Before scaling: xprint=0.0, yprint=0.0
Mar 14 16:53:52 fedora cupsd[24030]: [Job 56] cfFilterImageToPDF: cfImageGetXPPI(img) = 72, cfImageGetYPPI(img) = 72, aspect = 1.000000
Mar 14 16:53:52 fedora cupsd[24030]: [Job 56] cfFilterImageToPDF: Portrait size is 0.00 x 0.00 inches
Mar 14 16:53:52 fedora cupsd[24030]: [Job 56] cfFilterImageToPDF: Landscape size is 0.00 x 0.00 inches

It looks like the image is loaded incorrectly...

Would you mind looking into it?

@zdohnal zdohnal changed the title Printing JPEG file to a Postscript printer generates empty sheet Printing an image to a Postscript printer generates empty sheet Mar 15, 2023
@zdohnal
Copy link
Member Author

zdohnal commented Mar 15, 2023

Updating the title - printing any image (.jpeg, .png, .tiff) to a Postscript-only printer is affected - I'm debugging it now, so far cfRasterPrepareHeader() returns only zeros for page size, so the problem origins from there.

@zdohnal
Copy link
Member Author

zdohnal commented Mar 15, 2023

Actually the problem happens in libppd - we don't create media-col attribute if there is no PageSize or media. Transferring to libppd.

@zdohnal zdohnal transferred this issue from OpenPrinting/libcupsfilters Mar 15, 2023
@tillkamppeter tillkamppeter transferred this issue from OpenPrinting/libppd Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant