Outputs only blank pages.
Brought to you by:
tobias-elze
Hi. I am trying to use pdfsandwich, but get nothing but white pages. Thinking I did something wrong, I tried using your own alice.pdf file, with the same result, only white pages. Which got me thinking something was broken. With my own files, I tried nopreproc, specifying the layout, language and such, to no avail. When installing, it went though without missing dependencies.
Here is the output:
User@User:~/Downloads/folder$ pdfsandwich alice.pdf pdfsandwich version 0.1.7 Input file: "alice.pdf" Output file: "alice_ocr.pdf" Number of pages in inputfile: 14 Parallel processing with 4 threads started. Processing page order may differ from original page order. Processing page 5. Processing page 12.identify -format "%w\n%h\n" "/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf[4]" Processing page 9. identify -format "%w\n%h\n" "/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf[8]" Pidentify -format "%w\n%h\n" "/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf[11]" rocessing page 1. identify -format "%w\n%h\n" "/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf[0]" identify: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. Warning: could not determine page size; defaulting to A4. identify: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. Warning: could not determine page size; defaulting to A4. identify: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. Warning: could not determine page size; defaulting to A4. identify: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. Warning: could not determine page size; defaulting to A4. convert: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. convert: no images defined `/tmp/pdfsandwich_tmpa5551b/pdfsandwich4358cb.pbm' @ error/convert.c/ConvertImageCommand/3210. ERROR: Command "convert -units PixelsPerInch -type Bilevel -density 300x300 "/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf[8]" /tmp/pdfsandwich_tmpa5551b/pdfsandwich4358cb.pbm" failed. Terminating pdfsandwich. All temporary files are kept. User@User:~/Downloads/folder$ convert: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. convert: no images defined `/tmp/pdfsandwich_tmpa5551b/pdfsandwich171af3.pbm' @ error/convert.c/ConvertImageCommand/3210. convert: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. convert: no images defined `/tmp/pdfsandwich_tmpa5551b/pdfsandwich3306f8.pbm' @ error/convert.c/ConvertImageCommand/3210. convert: not authorized `/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf' @ error/constitute.c/ReadImage/412. convert: no images defined `/tmp/pdfsandwich_tmpa5551b/pdfsandwicheb5cd2.pbm' @ error/convert.c/ConvertImageCommand/3210.
Here it just stops, looks like it is not exiting properly.
The same problem with convert is present, when trying other pdf's, and nopreproc, and such.
ERROR: Command "convert -units PixelsPerInch -type Bilevel -density 300x300 "/tmp/pdfsandwich_tmpa5551b/pdfsandwich_inputfile501d10.pdf[8]" /tmp/pdfsandwich_tmpa5551b/pdfsandwich4358cb.pbm" failed.
Please do say, if you need any other documentation.
Hi, this looks like an ImageMagick problem and might be a duplicate of Bug #22: On some systems, ImageMagick has not enough permissions to deal with pdf files. You can easily fix this. Look, for instance, here:
https://stackoverflow.com/questions/42928765/convertnot-authorized-aaaa-error-constitute-c-readimage-453
Does that help?
Thank you that did the trick, and your program works beautifully!