Closed guoquanle closed 1 month ago
Try with an external library, the bundled library is compiled without CJK.
Any external library can be recommend? And I encountered a situation where there was no CJK before, and it gave such an error instead of a direct crash. error: cannot find builtin CJK font
You need MuPDF library installed, then use extlib
tag, and if needed add static
or pkgconfig
tags.
Is it possible to catch this error? The fact that the process falls unexpectedly is very frustrating. Also, are there any recomendations how to make sure that my program get a proper (handleable) error without changes in the library? This crashes make me use pymupdf, wich is even more frustrating, than crash, because it is slow, but at least it throws handleable exceptions
Now it will return error for broken files when load/run page is started.
cleancode.pdf when using doc.Image(pageNumber),this PDF will error, error page is 211.
error info: warning: jbig2dec error: DW value (-75) would make SYMWIDTH (0) negative at symbol 655 (segment 0) warning: jbig2dec warning: failed to decode; treating as end of file (segment 0) error: aborting process from uncaught error!