Re: https://github.com/pymupdf/PyMuPDF-Utilities/blob/master/examples/convert-text/convert.py
This script produces invariably the following error with all the PDF files I used, including one that contains just the text "Hello world":
"UnicodeDecodeError: 'charmap' codec can't decode byte 0x9c in position XXX: character maps to "
Use https://www.imagetotext.info/text-to-pdf to create a PDF file contaiining just "Hello world!". If you don't get the above error, please let me know what version of Python and PyNuPDF you are using. Mine are 3.10 and 1.26.4, rep/ly.
Re: https://github.com/pymupdf/PyMuPDF-Utilities/blob/master/examples/convert-text/convert.py
This script produces invariably the following error with all the PDF files I used, including one that contains just the text "Hello world":
"UnicodeDecodeError: 'charmap' codec can't decode byte 0x9c in position XXX: character maps to "
Use https://www.imagetotext.info/text-to-pdf to create a PDF file contaiining just "Hello world!". If you don't get the above error, please let me know what version of Python and PyNuPDF you are using. Mine are 3.10 and 1.26.4, rep/ly.