-
Notifications
You must be signed in to change notification settings - Fork 49
Description
Hi,
first of all - thank you for creating such a great package! It's been a game-changer for me and made life with PDFs so much easier.
Feature Request
I'd like to propose enhanced flattening options that give more control over text selectability.
Current Behavior
When using flatten=True, form fields become non-editable but also lose text selectability/copyability.
Proposed Enhancement
Add different flattening modes:
# Current behavior
pdf.fill(data, flatten=True) # Non-editable, non-selectable
# Proposed new options
pdf.fill(data, flatten="selectable") # Non-editable but selectable/copyable
pdf.fill(data, flatten="readonly") # Non-editable and not selectable/copyable (current)
Use Case
When you send a flattened PDF to someone else, they often need to copy information from it (names, addresses, reference numbers) without being able to edit the form, so the data you entered stays intact.
Currently, my experience is that the implemented flattening method makes this impossible since the text becomes non-selectable. I tried it with various workarounds and other packages, but it's not that easy.
If this is already possible, I would love for you to tell me how this is done easily. Otherwise, I think this feature could be of great value for a lot of people.
Version
PyPDFForm=3.5.1
Python=3.13.2
OS=macOS 26.0
Would love to hear your thoughts - thanks!