feat: comprehensive form field editing capabilities#5777
feat: comprehensive form field editing capabilities#5777denysvitali wants to merge 2 commits intoStirling-Tools:mainfrom
Conversation
- Add form field creation overlay with visual drag-to-create - Add form field modification panel for editing existing fields - Add property editor for field attributes (name, value, formatting) - Implement snap-to-grid and alignment utilities - Fix coordinate system mapping between PDF and display - Update FormFillContext for field CRUD operations - Add support for text, checkbox, radio, and combo box fields - Improve field positioning accuracy across save/load cycles Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🌐 TOML Translation Verification Summary🔄 Reference Branch:
|
|
/deploypr |
|
(I know it's a draft, but I'm too curious not to try it out) |
🚀 PR Test DeploymentYour PR has been deployed for testing! 🔗 Test URL: http://23.22.230.180:5777 This deployment will be automatically cleaned up when the PR is closed. |
|
If you have questions feel free to ping, or swing by the Discord channel, if you want quicker answers. |
|
For some reason this code does not to be affected by: https://issues.apache.org/jira/browse/PDFBOX-5962 Not sure why though. But it would nice if we could keep it that way 😅 Sadly I can not really provide any insights what to do/avoid to achieve that, though. |
|
Also one last note from me; I do not mind the AI generated PR message, but one thing; please do not generate the testing checklist and actually take it seriously. I see some items there that was almost 100% not actually tested. So, please going forward make sure to only check stuff that was actually done. Thanks! |
|
This is a great start, some good work :D |
- Fix null pointer exception when page annotations list is null - Explicitly set /P entry in widget COS dictionary for proper page reference persistence, fixing "Could not find page for widget" warnings - Apply code formatting (spotless) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>



Note
This feature was completely developed by Claude Opus 4.6 (Claude Code).
The code has been personally tested and verified working by me, though it may benefit from additional review and improvements.
Summary
This PR adds comprehensive form field editing capabilities to Stirling-PDF, enabling users to create, modify, and manage PDF form fields directly in the browser.
Features Added
Technical Changes
Backend:
FormUtils.javawith field creation and update utilitiesFormFillController.javawith CRUD endpoints for form fieldsFormFieldWithCoordinates.javamodel for additional field propertiesFrontend:
FormFieldCreatePanel,FormFieldCreationOverlay,FormFieldEditOverlay,FormFieldModifyPanel,FormFieldPropertyEditorformCoordinateUtils.ts) and snap utilities (formSnapUtils.ts)FormFillContextfor field CRUD operationsen-GBBug Fixes
page.getAnnotations()could return null, causing an NPE when trying to add a widget to the annotations list. The code now properly initializes the annotations list if null before adding widgets.Potential Impact
May fix #320
Testing Checklist
🤖 Generated with Claude Code