cantoo-scribe / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
124 stars 24 forks source link

form.flatten() leaves border around checkboxes and radio groups #51

Closed Nerdsie closed 3 months ago

Nerdsie commented 6 months ago

What were you trying to do?

Flatten a pdf containing fields such as checkboxes and radio groups

How did you attempt to do it?

form.flatten();

What actually happened?

Screenshot 2024-03-09 045227 Screenshot 2024-03-09 050340

After form.flatten() all checkboxes and radiogroups, whether they were selected or not, appear to have a border around where the previous form fields was.

What did you expect to happen?

image

The field should contain the proper value, but not have any erroneous borders added

How can we reproduce the issue?

Attempt to .flatten() any pdf with checkboxes or radiogroups.

Version

1.21.0

What environment are you running pdf-lib in?

Node

Checklist

Additional Notes

No response

Sharcoux commented 6 months ago

Seems related to https://github.com/cantoo-scribe/pdf-lib/issues/41

We don't use that feature. If someone would like to have a look and suggest a PR, we might consider it.

Sharcoux commented 3 months ago

Solved with https://github.com/cantoo-scribe/pdf-lib/pull/56 and released in v2.1.6