Skip to content
Discussion options

You must be logged in to vote

Please note that my experience with PDF forms is rather limited, thus going into detail might be harder for me.

In the parameter docs for flatten, we can read:

Whether or not to flatten the annotation. If True, this adds the annotation's appearance stream to the page contents. Note that this option does not remove the annotation itself.

If you follow the code flow, you will see that pypdf attempts to add an appearance stream to the field accordingly.

At first sight, your test looks correct - the failure seems to be a bug/robustness issue from our side (PRs welcome). Depending on your use case, you might want to additionally check the actual rendered output with different applications ag…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@led3zma
Comment options

Answer selected by led3zma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants