Skip to content

Some insertion methods fails for pages without a /Resources object #4141

Closed
@JorjMcKie

Description

@JorjMcKie

Description of the bug

For attached file, TexWriter text insertions and .insert_htmlbox will fail.

How to reproduce the bug

doc=pymupdf.open("FzErrorArgument_single_page.pdf")
page=doc[0]
page.insert_htmlbox((100,100,200,200),"Hallo")

Will fail - similar for TextWriter.
FzErrorArgument_single_page.pdf

PyMuPDF version

1.25.1

Operating system

Other

Python version

3.12

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions