#142- checkboxes and radio buttons handling#143
Closed
Cubix33 wants to merge 2 commits into
Closed
Conversation
5 tasks
|
Hi @Cubix33! Excellent work on this. Catching the I was actually working on a similar structural refactor for checkboxes and ran into a few massive edge cases with real-world government PDFs that you might want to consider for this implementation:
I recently pushed a massive refactor that natively handles all three of these legacy PDF issues (especially the missing Let me know what you think. Great work again on getting this started! |
Author
|
Closing for now to reduce load on maintainers. Will reopen after further discussion or during GSOC. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #142
🚀 Description
This PR introduces technical support for PDF Checkbox and Radio Button widgets (
/Btnfield types).Currently, the filling logic in
filler.pyassumes all form fields are text-based (/Tx), which causes issues when trying to "check" a box. This update allows the system to distinguish between text boxes and buttons, ensuring that checkboxes are visually rendered correctly by manipulating both the Value (/V) and Appearance State (/AS).🛠️ Changes Made
src/llm.pyadd_response_to_jsonto normalize LLM outputs into standardized PDF boolean states (YesorOff).src/filler.pyPdfNamefrompdfrwto support PDF-native name objects. [cite: 1]/FT(Field Type) of annotations. [cite: 1]/Btnwidgets, the system now sets the/Vand/ASkeys usingPdfNameto ensure the checkmark is visually rendered in PDF viewers. [cite: 1]/Txfields. [cite: 1]🧪 How to Test
src/inputs/file.pdf.make exec.✅ Checklist
/Btnvs/Txfield types.