Bug 102531 - A blank page output when print a specific JPEG file with eog
Summary: A blank page output when print a specific JPEG file with eog
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Chris Wilson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-04 06:00 UTC by zhangxiufu
Modified: 2018-08-25 13:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
The JPEG file that occures the problem (4.85 MB, image/jpeg)
2017-09-04 06:00 UTC, zhangxiufu
Details
The Cairo generated print data (859 bytes, application/pdf)
2017-09-04 06:02 UTC, zhangxiufu
Details
Printing to a file instead of a printer and got a 859bytes PDF file (859 bytes, application/pdf)
2017-09-08 03:12 UTC, zhangxiufu
Details

Description zhangxiufu 2017-09-04 06:00:58 UTC
Created attachment 133953 [details]
The JPEG file that occures the problem

Please describe the problem:
A blank page output when print a specific JPEG image file.
I have a JPEG image file "Penguins_1200_half.jpg" that is 12773x4922 pixels. When I open the image with Image Viewer and choose print, the file cannot be printed correctly, a blank page is output by the printer. 
The file in question is available for your perusal at attachment.

Product Version details: Image Viewer 3.24.0
Print data creator Version details:Cairo 1.14.8
Distribution/Version: Ubuntu 17.04

Steps to reproduce:
1. Open the file with Image Viewer.
2. Print the file.

Actual results:
The file cannot be printed correctly, a blank page is output by the printer.

Expected results:
The file should print as it is displayed on the preview.

Does this happen every time?
Yes

Detailed analysis:
I pause the print queue and obtain the Image Viewer generated print data (d00XXX-001(XXX: Job's No.)) in /var/spool/cups. This is a pdf format file, and I have confirmed that is a blank page open with Document Viewer (Evince). 
When I open the data with gedit, and found the creator of PDF data is Cairo (Ver.1.14.8). For details, please refer to the attachment “d00275-001”

Excerpt:
<< /Creator (cairo 1.14.8 (http://cairographics.org))
   /Producer (cairo 1.14.8 (http://cairographics.org))
>>

So I think the issue is probably caused by Cairo.

Other information:
1. This problem only occurs on Ubuntu 17.04. It does not occurs on Ubuntu 16.04, CentOS 7.3 and OpenSUSE Leap 42.2.
2. On Ubuntu 17.04, this problem does not occurs when open the file with "Shotwell(0.22.0)".
3. This problem is occurs only when the JPEG file "Penguins_1200_half.jpg" is printed. Other JPG files are printed, the result becomes OK.
4. We reported this bug to ImageViewer and got replied that their printing code is unchanged since GNOME 3.8, so it was impossible that ImageViewer cause this bug.For details, please refer to the following bug report:https://bugzilla.gnome.org/show_bug.cgi?id=783416
Comment 1 zhangxiufu 2017-09-04 06:02:48 UTC
Created attachment 133954 [details]
The Cairo generated print data
Comment 2 Adrian Johnson 2017-09-04 11:24:15 UTC
I tested the jpeg with eog 3.20.5 and cairo 1.14.8. I printed to a PDF file and got a 5MB PDF containing the image. Renders fine in evince.

I also compiled eog 3.24.0 and got the same result. This is on Debian Stretch which appears to be using the same cairo .deb as Ubuntu 17.04. So I'm not sure why it is not working for you.

Could you try printing to a file instead of a printer to see if the PDF is the same.
Comment 3 zhangxiufu 2017-09-08 03:11:01 UTC
(In reply to Adrian Johnson from comment #2)
> I tested the jpeg with eog 3.20.5 and cairo 1.14.8. I printed to a PDF file
> and got a 5MB PDF containing the image. Renders fine in evince.
> 
> I also compiled eog 3.24.0 and got the same result. This is on Debian
> Stretch which appears to be using the same cairo .deb as Ubuntu 17.04. So
> I'm not sure why it is not working for you.
> 
> Could you try printing to a file instead of a printer to see if the PDF is
> the same.

Dear Adrian Johnson,

Thank you very much for your reply.

This problem only occurs on Ubuntu 17.04. It does not occurs on Ubuntu 16.04, CentOS 7.3 and OpenSUSE Leap 42.2. 
So I think it is possible that the problem is not happened when you test the problem on Debian Stretch.

I tried printing to a PDF file instead of a printer and got a 859bytes PDF without containing the image. For details, please refer to the attachment “Penguins_1200_half.jpg.pdf”.

If possible, I hope you can try printing the jpeg with eog on Ubuntu 17.04 to see if the problem is being reproduced.
Comment 4 zhangxiufu 2017-09-08 03:12:32 UTC
Created attachment 134063 [details]
Printing to a file instead of a printer and got a 859bytes PDF file
Comment 5 Adrian Johnson 2017-09-08 07:09:23 UTC
I installed Ubuntu 17.04 amd64 in a virtual machine, printed the JPEG to a pdf file using eog 3.24.0 and got a 5MB pdf file that renders correctly.
Comment 6 GitLab Migration User 2018-08-25 13:49:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/208.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.