Hi, 

> 
Thanks; please post attach your text and the patch to the issue you 
> mentioned. This way it is easier to communicate with you and and the 
> coments will be there as long as the bug tracker exists. If possible, 
> avoid making formatting changes to code that you didn't touch.
> 
> Tilman
> 
> Am 17.06.2020 um 15:48 schrieb Sebastian Fieber:
> > Hey,
> > 
> > we are using PDFBox for one of our products and have a proposed
> > improvement for PDFBOX-3812.
> > 
> > The problem we are facing with the current implementation of
> > auto-sized multiline text fields is the following:
> > 
> > 1. If the rectangle of the multiline text field has a reasonable height
> >     for a few lines and only a few characters are put in the text field
> >     the font will get too big, resulting in strange looking input.  If
> >     edited aftewards with Adobe Acrobat the font size is adjusted to 12pt
> >     (like the DEFAULT_FONT_SIZE).


Having done a quick test in Acrobat for a heigh text field with multi line and 
auto font sizing when entering a small portion of
text the font size will be large. See the attachments I added to PDFBOX-3812 
just now.

BR
Maruan 


> > 
> > 2. Words are not broken if they are too long to fit in the width of the
> >     textbox.  The result is that the part not fitting is cut off.
> > 
> > The attached patch tries to fix these issues in the following way:
> > 
> > 1. Use DEFAULT_FONT_SIZE instead of MAX_FONT_SIZE to calculate the
> >     maximum line height for multiline text fields
> > 
> > 2. Test if a word is longer than the width if it is the only word
> >     present on a line.  If yes a similar alorithm to calculate the font
> >     size in 1. is used.
> > 
> > If there are any problems with the patch, please let me know.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
-- 
Maruan Sahyoun

FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen

Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
[email protected]
www.fileaffairs.de

Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to