Closed AndresEV22 closed 1 month ago
As stated in the documentation: There can no guarantee for PDF-to-PDF conversion to work. Neither is "repairing" a PDF leading to an error-free PDF in all cases.
So this is no bug - just a PDF messed-up beyond a way to repair it. Why do you want to do that conversion anyway?
Because I have a pdf with form fields, when these fields are fully complete, I need to remove this one, but the text can't disappear.
Because I have a pdf with form fields, when these fields are fully complete, I need to remove this one, but the text can't disappear.
Aha! Thought it must be this. Please look at Document method bake. It will remove annotations and / or form fields and make their current appearance a permanent part of the page.
Oh, I see. My bad. Thanks for the help. I am grateful.
Description of the bug
Hi, first, sorry for my bad English, but I will try to explain my bug or error. Yesterday I updated my pyproject.toml dependencies, and at this moment I am getting an error when the convert_to_pdf() is executed. This error or bug happens when I try to convert a PDF with more than one page; if the PDF has just one page, this doesn't happen. After searching on the internet, I found something about this error. It says that the error is because the PDFs are corrupt, but I tried to repair the PDF with the "gs -o corrected.pdf -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress damage.pdf" Linux command or in another way with ILovePDF, but the error persists.
I applied the migration between 1.22.5 and 1.24.4 with these changes:
How to reproduce the bug
The extact error is:
and this is my function:
and my proyect environment is based on python hacth. To clarify this "error," permits work well but are not ideal.
PyMuPDF version
1.24.4
Operating system
Linux
Python version
3.12