Bug 42757 - pdftops creates an invalid .ps file for attached pdf file
Summary: pdftops creates an invalid .ps file for attached pdf file
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 12:33 UTC by c sights
Modified: 2012-02-15 02:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test PDF (573.73 KB, application/pdf)
2011-11-09 12:33 UTC, c sights
Details

Description c sights 2011-11-09 12:33:30 UTC
Created attachment 53346 [details]
test PDF

Hello,
   pdftops appears to have trouble generating a ps file from this pdf.  I noticed this while using Okular, which could display the file correctly, but couldn't print. (It printed blank pages.)

I reported this to Okular bugs and got this reply:

--- Comment #1 from Albert Astals Cid <tsdgeos terra es>  2011-11-09 19:02:54 ---
True, poppler PSOutputDev seems to be creating invalid .ps for this file. This
is nothing we can fix since we rely on poppler PSOutputDev working correctly,
please go to https://bugs.freedesktop.org and report a bug saying that pdftops
creates and invalid .ps file for this pdf file.

You can reproduce the problem alone without okular doing:
  pdftops myfile.pdf
  gs myfile.ps

And see how gs complains the .ps file is malformed.


$ pdftops /tmp/win-form.pdf 
Error: Invalid Font Weight
Error: Invalid Font Weight
Error: Invalid Font Weight

$ gs /tmp/win-form.ps 
GPL Ghostscript 9.04 (2011-08-05)
Copyright (C) 2011 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusSanL-Regu font from /usr/share/fonts/type1/gsfonts/n019003l.pfb... 2638744 1288898 2902656 1596211 1 done.
Error: /typecheck in definefont
Operand stack:
   F48_0   --dict:9/10(L)--   Font
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1910   1   3   %oparray_pop   1909   1   3   %oparray_pop   1893   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1866   2   4   %oparray_pop
Dictionary stack:
   --dict:1154/1684(ro)(G)--   --dict:0/20(G)--   --dict:78/200(L)--   --dict:69/75(L)--
Current allocation mode is local
Current file position is 168468
GPL Ghostscript 9.04: Unrecoverable error, exit code 1



Thanks for your coding!
Comment 1 c sights 2011-11-09 12:34:42 UTC
$ pdftops -v
pdftops version 0.16.7
Copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2004 Glyph & Cog, LLC
Comment 2 Adrian Johnson 2012-02-15 02:03:45 UTC
Reproduced with 92ce79f4. Works with master. Looks like it has been fixed by the xpdf-3.03 merge.


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.