Bug 19438 - PostScript file generated by Poppler's pdftops utility are broken when PDF input comes from f-spot (or perhaps also other GTK/Cairo apps)
Summary: PostScript file generated by Poppler's pdftops utility are broken when PDF in...
Status: RESOLVED NOTOURBUG
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: high major
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 05:15 UTC by Till Kamppeter
Modified: 2009-01-08 11:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix bug 18908, as it is applied to the Ubuntu package (5.51 KB, patch)
2009-01-07 06:46 UTC, Till Kamppeter
Details | Splinter Review
Additional patch which is applied to the Ubuntu package (443 bytes, patch)
2009-01-07 06:47 UTC, Till Kamppeter
Details | Splinter Review

Description Till Kamppeter 2009-01-07 05:15:22 UTC
The attached PDF file is generated when printing with f-spot (in Ubuntu Intrepid, x86_64). The PDF file is a 4x6 inch photo and is correctly displayed by Ghostscript and evince. If one converts it with Poppler's pdftops utility

pdftops photo.pdf

or

pdftops -level3 -paperw 296 -paperh 444 photo.pdf

the size of the resulting photo.ps gives the impression that the photo is still contained but Ghostscript only shows an nearly empty page, at least of the correct size. There are traces of the photo in the lower left corner.
Comment 1 Till Kamppeter 2009-01-07 05:17:24 UTC
Unfortunately, the photo.pdf file is too big for attaching to this bug. It is available here:

http://launchpadlibrarian.net/20978481/photo.pdf
Comment 2 Till Kamppeter 2009-01-07 05:28:36 UTC
I use the Poppler version of Ubuntu Intrepid with all updates. It contains the patch of bug 18908.
Comment 3 Albert Astals Cid 2009-01-07 05:32:29 UTC
It works here on poppler-0.10 branch so either your patch is wrongly applied or something else changed in gs.
Comment 4 Till Kamppeter 2009-01-07 06:44:16 UTC
My installed Poppler version is 0.8.7, the one which comes with Ubuntu Intrepid. It has the patch from bug 18908 applied. I attach the patch again. There is also another small patch against crashes applied to the active code. I also attach it.

Comment 5 Till Kamppeter 2009-01-07 06:46:25 UTC
Created attachment 21747 [details] [review]
Patch to fix bug 18908, as it is applied to the Ubuntu package
Comment 6 Till Kamppeter 2009-01-07 06:47:12 UTC
Created attachment 21748 [details] [review]
Additional patch which is applied to the Ubuntu package
Comment 7 Adrian Johnson 2009-01-07 06:49:34 UTC
On Ubuntu Intreprid with all updates I can reproduce this bug using /usr/bin/pdftops. With the latest poppler from git it works for me.

I would suggest getting a diff between the Intrepid PSOutputDev.cc and the PSOutputDev.cc in the 0.10 branch at the time the fix was applied to see what is different in Intrepid. As you can see from the history of this file there is very little that has changed in this file in the last 6 months:

http://cgit.freedesktop.org/poppler/poppler/log/poppler/PSOutputDev.cc?h=poppler-0.10

Does Intrepid include the commit from 2008-09-19 "make sure the image is setup before using it, otherwise some things don't print"?
Comment 8 Albert Astals Cid 2009-01-07 07:16:27 UTC
Till i'm not doing your job man ;-) Get yourself poppler 0.10 from git and test if it works for you, in case it does not work, we can continue looking why it does for me and does not for you.
Comment 9 Till Kamppeter 2009-01-07 07:42:03 UTC
Adrian, my version of the file is from June 1, 2008, and I have tried to apply the "make sure the image is setup before using it, otherwise some things don't print" patch and nothing changed.
Comment 10 Till Kamppeter 2009-01-07 07:57:05 UTC
In contrary to bug 17645, the image data of the photo is present in the PostScript file. It seems here that the image is moved out of the frame, to the lower left.
Comment 11 Till Kamppeter 2009-01-07 08:19:14 UTC
I have now also tried the patches from 2008-09-05 and from 8 days ago and I have still the broken output. Seems that the fix happened in another file than PSOutputDev.cc.
Comment 12 Till Kamppeter 2009-01-08 01:57:31 UTC
I have done another test: Ubuntu Intrepid version (0.8.7) with only the patch of bug 18908 applied. With a really clean Intrepid (Ghostscript 8.63) the resulting PostScript file displays correctly. On my system was Ghostscript 8.64 and with this version the file did not display -> Ghostscript regression.
Comment 13 Till Kamppeter 2009-01-08 02:14:29 UTC
Reported Ghostscript problem as http://bugs.ghostscript.com/show_bug.cgi?id=690222
Comment 14 Albert Astals Cid 2009-01-08 11:48:41 UTC
Thanks for finding this! In case it results it's not a gs regression but a "bugfix" please comeback to us.


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.