Skip to content

insert_file(...) breaks radio button groups #5055

Description

@Patschke

Description of the bug

While the documentation states

PyMuPDF does not currently support the creation of groups of (interconnected) radio buttons

I was expecting to be able to append files with radio buttons in them. However, this seems to break the button groups. The resulting mwe_out.pdf has broken radio buttons in them: Depending on the pdf viewer, it is broken in different ways. Using evince, you can click each button only once, before it stops working. Using firefox, the 2nd button is stuck if you click it, while the other 4 keep working.

I'm not sure if this is a bug in PyMuPDF, in MuPDF, or expected behaviour in terms of limited radio-button compatibility.

How to reproduce the bug

I've put together a MWE (or rather: minimal-failing-example?). A minimalistic mwe.pdf generated using LaTeX mwe.tex with a set of 5 radio buttons and 4 lines of python code mwe.py: It opens the pdf, insert_file(...)s it into another (empty) pdf and saves the result.

PyMuPDF version

1.28.0

Operating system

Linux

Python version

3.14

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