Using this PDF file: http://www.mos6581.org/rinohtype/_downloads/demo.pdf This works: pdftoppm -f 5 -singlefile -gray demo.pdf >demo.pgm This fails to parse the PDF properly: cat demo.pdf | pdftoppm -f 5 -singlefile -gray - >demo.pgm This has the same effect: pdftoppm -f 5 -singlefile -gray - <demo.pdf >demo.pgm These warnings are output: Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15429): Illegal character ')' Syntax Error (15445): Illegal character ')' Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Element of show/space array must be number or string Syntax Error (15445): Unknown operator 'Enote' Syntax Error (15445): Unknown operator ']' Syntax Error (15445): Too few (0) args to 'TJ' operator This used to work with poppler 0.41.0. I have tried a couple of versions since then, all of which suffer from the same problem. 0.47.0 is still broken. I believe the other utils have similar problems with reading from stdin.
Created attachment 126512 [details] PDF file that can be used to trigger the bug
(In reply to Brecht Machiels from comment #0) > These warnings are output: > > Syntax Error (15429): Illegal character ')' > Syntax Error (15429): Illegal character ')' > Syntax Error (15429): Illegal character ')' ... I'm surprised this works as well as it does, with PDFs requiring random access... Not assigning blame, but git bisect found this commit, so it probably has something to do with matte images. 36c276f1af7e0f1d8a207f6cdcaa80a24e95e044 is the first bad commit commit 36c276f1af7e0f1d8a207f6cdcaa80a24e95e044 Author: Thomas Freitag <Thomas.Freitag@alfa.de> Date: Wed Mar 2 09:50:01 2016 +0100 Splash: Implementation of matte entries in softmasks of softmasked images Bug #22473 :040000 040000 c279d786dc25cb4e54d54ff791c4642962ec9677 bca10de9202aa0d6bb5f49327583428f11d73a5f M poppler
Created attachment 126600 [details] [review] read softmask into memstrean in case of matte In case of matte the softmask has to be read twice. This is not possible when read from stdin. So this patch allocate a memstream first and read the softmask into this memstream.
worth using doGetChars instead of a one by one read?
Created attachment 126845 [details] [review] read softmask into memstrean in case of matte Sure, ALbert. I searched for that function but missed it, found just getChars() which is private. Here the new patch.
Pushed.
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.