"object (___) was not found in its object stream" error #1213
-
I am experiencing an issue with a handful of PDF files. After opening these specific files with fitz.open(file) , I am greeted with a string of the following errors:
The program does not crash however. However, when attempting to save the file using pdf.save() the program will crash.
Using metadata, I found that the problem files all had a metadata['creator'] value of "PDF-XChange Editor 7.0.326.1" Any idea what is going on or how this issue could be fixed would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 18 replies
-
These PDFs are severely damaged. Impossible to tell why from this end. Try to clean the file via |
Beta Was this translation helpful? Give feedback.
-
I have a similar case |
Beta Was this translation helpful? Give feedback.
These PDFs are severely damaged. Impossible to tell why from this end.
The message may sound cryptic, but that PDF viewer compresses PDF objects into so-called objects streams (object type "Objstm" to save space. These are objects that contain other object definitions. Here, MuPDF cannot find objects in some of these compressed data.
Try to clean the file via
mutool clean -gggg damaged.pdf ...
. May not work if the problems are too severe. If it fails you may be able to at least rescue a few pages viainsert_pdf
using a new file.