Bug 98212 - pdftops output empty pdf
Summary: pdftops output empty pdf
Status: RESOLVED MOVED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 06:12 UTC by clark
Modified: 2018-08-20 22:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test PDF (101.19 KB, application/pdf)
2016-10-12 06:12 UTC, clark
Details

Description clark 2016-10-12 06:12:23 UTC
Created attachment 127233 [details]
test PDF

I don't know where in the process it fails but these two command lines output an empty PDF file

pdftops version 0.46.0

PDF:
http://docdro.id/qY5UQ8l

pdftops test.pdf out.ps
ps2pdf -dPDFSETTINGS=/screen -dColorImageResolution=50 -dGrayImageResolution=50 out.ps outps.pdf
Comment 1 clark 2017-01-31 12:54:21 UTC
I have been in contact with ghostscript regarding this issue and this is their answer. Hope it could be useful :)

https://bugs.ghostscript.com/show_bug.cgi?id=697525

Running the PostScript file through Ghostscript gives an error "rangecheck in --xyshow--" for me, which you seem to have neglected to mention in your report.

Adobe Acrobat Distiller gives exactly the same error.

Looks like pdftops produced a broken PostScript program, nothing *we* can do about that for you. The PostScript contains (simplifying considerably):

(\000\015)
[6.972
0] xyshow

Each character code in the string (note its a 2 byte string, so 2 character codes)  uses one pair of numbers from the array for positioning. Since there are two character codes, it needs an array with 2 pairs of positions, 4 numbers. This array contains only 2, hence the rangecheck error.

It 'looks like' the poppler developers thought they could define a simple font with 2 byte character codes (the font is created by a routine called pdfMakeFont16), but that's not possible. You need a type 0 font or a CIDFont to use more than a single byte code. This is, of course, caused by the fact that the original PDF file contains a CIDFont.

So basically poppler is broken, you're opening a bug report against the wrong product, maybe you should send it to the poppler developers.

Of course, PDF->PS->PDF is a dumb thing to do anyway, you are practically bound to lose quality doing so. If for some strange reason you absolutely must do this, perhaps you should consider using Ghostscript's ps2write device to produce the intermediate PostScript file, since that actually works, though it does produce bitmaps for the glyphs; this is what I mean when I say that the refrying loses quality.

If I were you I would think carefully about why you are doing this multi-step process and whether the intermediate PostScript file is actually required.
Comment 2 clark 2017-04-21 22:00:12 UTC
Any news about this one? :)
Comment 3 clark 2017-09-07 11:55:12 UTC
Is it possible to know if this is something you prioritize because its quite important for us to know :)

Because then we have to look for another solution
Comment 4 Albert Astals Cid 2017-09-07 17:28:43 UTC
Speaking about me, but since i do this my poppler bug in my spare time I work in the bugs i feel like are more interesting to me, the fact that you "need to prioritize this" means that you are making money of using poppler, so maybe you should hire someone to fix it or wait until someone of the people that work on they spare time finds interesing to fix this.
Comment 5 GitLab Migration User 2018-08-20 22:00:13 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/poppler/poppler/issues/152.


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.