Bug 69717 - Invalid postscript level 3 is generated
Summary: Invalid postscript level 3 is generated
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-23 14:50 UTC by Alex Korobkin
Modified: 2013-10-01 17:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
volunteer_form.pdf (33.29 KB, text/plain)
2013-09-23 14:50 UTC, Alex Korobkin
Details
resulting postscript: volunteer_form.ps.gz (630.05 KB, application/x-gzip)
2013-09-23 14:51 UTC, Alex Korobkin
Details
/volunteer_form.pdf (33.29 KB, application/pdf)
2013-09-23 14:52 UTC, Alex Korobkin
Details
fix ps font embedding (2.62 KB, patch)
2013-09-27 12:27 UTC, Adrian Johnson
Details | Splinter Review

Description Alex Korobkin 2013-09-23 14:50:55 UTC
Created attachment 86377 [details]
volunteer_form.pdf

Hi team, 

Here is a PDF that when converted to PostScript level3 with pdftops 0.24.1 -level3 -origpagesizes -r300 cannot be opened with neither Evince, nor GhostScript, nor Adobe Pro.
Comment 1 Alex Korobkin 2013-09-23 14:51:33 UTC
Created attachment 86378 [details]
resulting postscript: volunteer_form.ps.gz
Comment 2 Alex Korobkin 2013-09-23 14:52:33 UTC
Created attachment 86379 [details]
/volunteer_form.pdf
Comment 3 James Cloos 2013-09-23 17:06:08 UTC
The origpagesizes and r options are not required to trigger the bug.

Nor is level3; the level1 and level2 outout also fail in gs.

The output from pdftocairo works; so it is spash-specific.

Removing the included version of Palatino Roman from the postscript file
is enough to make it work.

The fonts are not embedded in the pdf; here (as one would expect)
poppler substitutes URW Palladio L, but it embedded it in the ps as
binary data; not ascii-fied.

For some reason it selected ttf fonts for the other faces; those were
embedded correctly.  (I do have both the t1 and ttf urw 35 where
fontconfig can find them; I don't know why pdftops chose the t1 for one
face and the ttf for the other.)

The problem seems limited to the case where pdftops has to embed a font
which was not embedded in the pdf and where it finds said font as a pfb.

pdftocairo chose the same fonts to embed, it just embeded the t1 as a
pfa rather than as a pfb.
Comment 4 Albert Astals Cid 2013-09-23 17:58:00 UTC
James don't think Splash has anything to do here, more like PSOutputDev
Comment 5 James Cloos 2013-09-24 18:28:20 UTC
> James don't think Splash has anything to do here, more like PSOutputDev

Yes, of course.  Well spotted.

Stupid think-o. ☹
Comment 6 Adrian Johnson 2013-09-27 12:27:25 UTC
Created attachment 86721 [details] [review]
fix ps font embedding

This patch should fix the bug.
Comment 7 Alex Korobkin 2013-09-27 14:58:24 UTC
I'm able to open and print the document normally with this patch. 
Thanks a lot for fixing.
Comment 8 Albert Astals Cid 2013-10-01 17:19:51 UTC
Patch pushed. Thanks :-)


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.