[
https://issues.apache.org/jira/browse/PDFBOX-2627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14289842#comment-14289842
]
Maruan Sahyoun commented on PDFBOX-2627:
----------------------------------------
That’s correct but the specification is incomplete if one want’s to replicate
to some extend what Adobe Acrobat does (btw. that was also some of the feedback
I gave for the PDF 2 spec).
E.g. Acrobat applies a padding dependent on the width of the border before
placing the text. I’ve already put that in as part of my previous work on
appearance generation but the current code is not very clean as that has been
put in to fix some restrictions in 1.8. For 2.0 I think it makes sense to have
a better approach. That’s were the box model requirement came from. Paragraph
separation needs to be done as one can put a CR into a fields value which will
be a paragraph separator. There is a slight difference in how Acrobat handles
spacing between paragraphs and lines so that has to be taken into account.
Vertical alignment is not needed for multiline text but for single line text as
the text is vertically centered in the box. So the composer would be able to be
used for that.
Again that development shall not be seen as a general purpose composer but
targeted only to match to some extend Acrobats behavior with a clean model we
don’t have today.
> Add block composer to handle multiline text
> -------------------------------------------
>
> Key: PDFBOX-2627
> URL: https://issues.apache.org/jira/browse/PDFBOX-2627
> Project: PDFBox
> Issue Type: Sub-task
> Components: AcroForm
> Affects Versions: 2.0.0
> Reporter: Maruan Sahyoun
> Fix For: 2.0.0
>
>
> In order to generate the appearance for multiline text a *basic* plain text
> block composer needs to be developed.
> Features
> - box model
> - paragraph separation
> - line breaking
> - horizontal and vertical alignment
> - font setting, line height …
> Conceptually it should also include writing mode likely with the only initial
> implementation being lr-tb.
> There should be no new dependencies on projects such as ICU which will limit
> the capabilities but should be acceptable to the needs of form filling.
> To not create the *false* assumption that this is a generic composer it will
> be sub packaged within the (AcroForms) forms package(s).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)