Skip to content

RuntimeError: not a dict (null) is raised when use Document.insert_pdf #2482

@hgdhot

Description

@hgdhot

RuntimeError: not a dict (null) is raised when insert_pdf

Describe the bug (mandatory)

When use Document.insert_pdf to insert some pages from another docuemnt, the RuntimeError is raised

To Reproduce (mandatory)

import fitz
src_doc = fitz.open('./non-dict.pdf')
doc = fitz.open()
doc.insert_pdf(src_doc, from_page=0, to_page=9)
doc.save('./non-dict-part.pdf')

non-dict.pdf

Your configuration (mandatory)

3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0]
linux

PyMuPDF 1.22.3: Python bindings for the MuPDF 1.22.0 library.
Version date: 2023-05-10 00:00:01.
Built for Python 3.8 on linux (64-bit).

Metadata

Metadata

Assignees

No one assigned

    Labels

    not a bugnot a bug / user error / unable to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions