Closed freaksie closed 1 week ago
I tried to extract the TU ('/TU'), but its not working
WIDGET_KEY_PATTERNS = [
{T: True},
{TU: True},
{Parent: {T: True, TU: True}},
]
I see the description is present in widget
instance
'/T': 'P1_Line3c_MiddleName[0]', '/TU': 'Part 1. Information About You. Your Full Name. 3. C. Enter Middle Name.'
Solved
Had to modify some files
Created new function in template.py get_widget_description
P1_checkbox4[0]": {
"description": "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select Yes. (Proceed to Item Numbers 5. A. through 5. C.).",
"type": "boolean"
},
"P1_checkbox4[1]": {
"description": "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select No (Proceed to Item Numbers 6. A. through 6. I.).",
"type": "boolean"
},
"P1_checkbox4[2]": {
"description": "Part 1. Information About You. Your Full Name. 4. Has your name legally changed since the issuance of your Permanent Resident Card? Select Not Applicable - I never received my previous card. (Proceed to Item Numbers 6. A. through 6. I.).",
"type": "boolean"
},
Let me know if you want me to push the changes @chinapandaman
Hey thanks for posting, and sorry for a rather late response.
You can open a PR against branch PPF-757 if you want.
Version
PyPDFForm=1.4.37
Issue Description
Unable to parse the description for the checkbox. This is important info for someone who has no reference to the original template (PDF).
Code Snippet
Sample of Json Output
PDF Form Template
i-90.pdf
Screenshots (if applicable)