pdfbox
pdfbox copied to clipboard
[PDFBOX-3812] Support auto size font for multiline PDTextField
https://issues.apache.org/jira/browse/PDFBOX-3812
As far as I know the pdfbox maintainers do not monitor github pull request.
I would advice you to add a comment with a link to this pull request to the issue (or send an email to the pdfbox developer mailing list).
Thanks for the tip, @PascalSchumacher. I just emailed their dev mailing list.
@dannymcpherson thank you very much for the contribution. @PascalSchumacher is correct that we don't monitor on a regular basis as this is only a mirror and the issues are being tracked using JIRA. Nevertheless I'll be hopefully able to add the changes later today.
There are some possible enhancements I see
- text can also scale up in order to fit the content area
- a font increment by 1 might be a little large - maybe there could be a setter for the increment step
Thank you, @msahyoun. I'm working on some changes to support autosizing upward. I also think I may have found a bug in the logic where it clips at large font sizes. Stay tuned.
@msahyoun - I just pushed a commit that improves the logic so that we use the largest font size that fits, where the font size is between 4 and 300 (the apparent max used by acrobat pro).
@dannymcpherson the feature has been fixed in PDFBOX-3812 and release for 2.0.21 and 3.0.0 - can you close the request?