pdfbox icon indicating copy to clipboard operation
pdfbox copied to clipboard

[PDFBOX-3812] Support auto size font for multiline PDTextField

Open dannymcpherson opened this issue 5 years ago • 6 comments

https://issues.apache.org/jira/browse/PDFBOX-3812

dannymcpherson avatar Dec 20 '19 21:12 dannymcpherson

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).

PascalSchumacher avatar Dec 23 '19 10:12 PascalSchumacher

Thanks for the tip, @PascalSchumacher. I just emailed their dev mailing list.

dannymcpherson avatar Dec 23 '19 16:12 dannymcpherson

@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

msahyoun avatar Dec 23 '19 17:12 msahyoun

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.

dannymcpherson avatar Dec 23 '19 19:12 dannymcpherson

@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 avatar Dec 23 '19 20:12 dannymcpherson

@dannymcpherson the feature has been fixed in PDFBOX-3812 and release for 2.0.21 and 3.0.0 - can you close the request?

msahyoun avatar Oct 16 '20 06:10 msahyoun