-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Labels
workflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow
Description
Explanation
I'd love to be able to change field properties. Specifically, in Adobe, it is possible to change the background color of a signature field to yellow, red, or another color for example. If someone could point me in the right direction I would happily make this myself.
Code Example
I assume this could be done two ways, by extending or appending functionality to the update_ function, or by creating a new function in its entirety. The latter of which is probably easier.
from pypdf import PdfReader, PdfWriter
reader = PdfReader("SOMEPATH")
writer = PdfWriter()
writer.append(reader)
for page in range(len(reader.pages)):
writer.update_page_form_field_properties(
writer.pages[page],
{
'field1': {"background": "#ffffff", "font": "Helvetica"},
'field2': {"fontSize": "14pt", "color": "#000000"},
}
)
Metadata
Metadata
Assignees
Labels
workflow-formsFrom a users perspective, forms is the affected feature/workflowFrom a users perspective, forms is the affected feature/workflow