Content was not written into target PDF file
Description of the bug
Hi Experts,
I'm using PyMuPDF to read content from original PDF and write new content into another target PDF after the content is translated. However, the translated content was not written into target PDF file at all. Could you please help look this issue?
Below is the whole coding file(translation is working fine): translate_pdf_document.py.txt
How to reproduce the bug
please refer to coding file
PyMuPDF version
1.25.1
Operating system
Windows
Python version
3.10
In your program you use page.insert_textbox but you do not check the return code of this method!
As documented, insertion will be refused if the text won't fit into the rectangle. This situation is indicated by a negative return code.
Your issue actually is "Discussions" item of category "looking for help". Transferring ...