and first of all so many thanks for a wonderful piece of software! I'm running Ubooquity as a systemd service on a Raspberry Pi with OSMC and it is beautiful - the most elegant way to access & enjoy the large collection of ebooks I was sitting on!
I see on the forum that there have been longstanding issues with Ubooquity and PDFs, and I thought I might add my grain of salt (and a few questions...)
1) It seems memory leaks are still an issue with larger PDFs, and Java OOM errors do occur - monitoring my swap space I could sometimes see it increase to gigas worth of data before the whole system would freeze completely (the RAM limit I set for Java was apparently not taken into account when it came to scanning PDFs). I'm pretty sure this is a pdfbox issue, not an Ubooquity one - so the ability to parse PDFs with an external software (mupdf or poppler) that Tom mentionned as a possibility for future versions seems the way to go! :)
In the meantime I manage to avoid most OOM by setting up a large swap space, temporarily disabling other services on the machine and setting the GPU share of the RAM to the minimum each time I want to launch a library scan with Ubooquity - a bit cumbersome but it does the trick!
2) My second PDF-related issue was a bit more tricky. At first Ubooquity would not scan files with accented characters - being French this was really a problem, although solving it was as simple as setting the system locale to fr_FR.UTF-8... *But* once this was done there was a fair number of PDFs that Ubooquity suddenly could no longer scan, with the following error showing up in logs: "java.lang.NoClassDefFoundError: Could not initialize class org.apache.pdfbox.pdmodel.font.PDType1Font"
After fiddling with various parameters, I found out that flagging the java command I use to start Ubooquity with "-Dfile.encoding=UTF-16" does the trick: Ubooquity now scans all my PDF files flawlessly, provided there are not corrupt or malformatted.
*But* - there must always be a "but" :( - when I start Ubooquity this way it doesn't handle CBR files anymore.
Not a biggie really - I use a simple bash script to convert all my CBR file to CBZ... Voilà! :)
Hence my questions:
- Is there another way to get Ubooquity to scan all my files, irrespective of their encoding?
- Would there be a way to use the "java -Dfile.encoding=UTF-16" flag ONLY for PDF parsing and rendering?
-Or alternatively, would there by a way to flag whatever utility is used to decompress and parse CBR files with another encoding parameter so that Ubooquity can parse RAR/CBR files again?
No worries, batch converting CBRs to CBZ is an easy enough workaround... But I'm still curious to know whether there would be a less dirty/more elegant/simpler solution to the PDF parsing issues... :)
Customer support service by UserEcho