View Single Post
Old 09-28-2023, 05:04 AM   #9
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,033
Karma: 2006208
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
@BetterRed & @ownedbycats: That were the first things I checked: negative.

I found the cause: its in the PDF file handling.
A working PDF-file has the following ending:
Code:
<</ID[<B43E3B0286664B420FA6AC3FE4CBFF8B><B43E3B0286664B420FA6AC3FE4CBFF8B>]
/Info 1935 0 R
/Root 1937 0 R
/Size 1945>>
startxref
55999427
%%EOF
My failing PDF-file (which is however perfectly genuine) shows:
Code:
<</Size 1127
/ID [(Vؘr„g‘X%ÃVCÙÂ) (Vؘr„g‘X%ÃVCÙÂ) ] 
/Root 1625 0 R >> 
startxref
37312594
%%EOF
Calibre did show as an error "EOFError", so I concluded it was parsing to something it expected, but did not find before hitting %%EOF.

As can be seen, my PDF-file is missing the (optional) entry "/info xxxx x R", so I manually added that and now calibre does not complain anymore.

My PDF-file was generated by using the well-known Poppler tool "pdfunite" (I tried multiple versions and the most recent 23.08.0 one for windows) , which never seems to include the "/info" entry.

First conclusion therefor is that the calibre parsing-tool is expecting something which not necessary needs to be present.
PDF-files are (and will be) a pain in the xxx
DrChiper is offline   Reply With Quote