Skip to content
Discussion options

You must be logged in to vote

As was to be expected: your files contain errors:

for page in doc:
    print("Page", page.number)

    
Page 0
Traceback (most recent call last):
  File "<pyshell#31>", line 1, in <module>
    for page in doc:
    <...>
    val = _fitz.Document_load_page(self, page_id)
RuntimeError: not a dict (null)
# see what MuPDF has to say:
print(fitz.TOOLS.mupdf_warnings())
invalid indirect reference (0 0 R)
... repeated 2 times...
not a dict (null)
cannot create appearance stream
invalid indirect reference (0 0 R)
... repeated 2 times...
not a dict (null)

If you look at the file directly with some text editor, you will see something like this:

By inspecting all xref sources with PyMuPDF, you could…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@JorjMcKie
Comment options

@doppelmarker
Comment options

@PasaOpasen
Comment options

@JorjMcKie
Comment options

Answer selected by doppelmarker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants