[
https://issues.apache.org/jira/browse/PDFBOX-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18152459#comment-18152459
]
ASF subversion and git services commented on PDFBOX-6345:
---------------------------------------------------------
Commit 1940896 from Tilman Hausherr in branch 'pdfbox/branches/3.0'
[ https://svn.apache.org/r1940896 ]
PDFBOX-6345: remove tabs
> Auto-sized multiline text fields compute line breaks for a width reduced by
> the padding
> ---------------------------------------------------------------------------------------
>
> Key: PDFBOX-6345
> URL: https://issues.apache.org/jira/browse/PDFBOX-6345
> Project: PDFBox
> Issue Type: Bug
> Components: AcroForm
> Affects Versions: 2.0.37, 3.0.8 PDFBox, 4.0.0
> Reporter: Martin Mirchev
> Assignee: Tilman Hausherr
> Priority: Major
> Fix For: 2.0.38, 3.0.9 PDFBox, 4.0.0
>
>
> In {{AppearanceGeneratorHelper.calculateFontSize}}, the multiline branch uses
> {{float width = contentRect.getWidth() - contentRect.getLowerLeftX();}}.
> {{contentRect}} is already the padded content area, so subtracting its lower
> left x reduces the width a second time. The text is then laid out with
> {{contentRect.getWidth()}} (the {{PlainTextFormatter}} in
> {{insertGeneratedAppearance}}), so the font size is chosen for a narrower
> field than the one the lines are drawn into: auto-sized ({{0 Tf}}) multiline
> fields can get a smaller font than fits. {{contentRect.getWidth()}} would
> make the two agree.
> This issue was found by an LLM-assisted tool and verified manually.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]