[
https://issues.apache.org/jira/browse/PDFBOX-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369197#comment-15369197
]
Maruan Sahyoun commented on PDFBOX-3413:
----------------------------------------
The use case is to be able to fill a field with text and get the portion which
didn't fit so that one can take that and fill an additional 'overflow' field
with it. That's similar to the {{fieldFull}} event in Acrobat JavaScript SDK
{quote}
Set to true when the user attempts to enter text that does not fit in the field
due to either a space limitation (the Field object property doNotScroll is set
to true) or the maximum character limit (the Field object property charLimit is
set to a positive value). When fieldFull is true, event.changeEx is set to the
entire text string the user attempted to enter and event.change is the text
string cropped to what fits within the field.
{quote}
with a sample of how that might be handled
{code}
if ( event.fieldFull ) {
app.alert("You've filled the given space with text,"
+ " and as a result, you've lost some text. I'll set the field to"
+ " scroll horizontally, and paste in the rest of your"
+ " missing text.");
this.resetForm([event.target.name]); // Reset field to lose focus
event.target.doNotScroll = false; // Make changes
event.change = event.changeEx;
}
{code}
Currently one can {{setValue}} but wouldn't get any feedback if all of the text
has been placed visually or is clipped.
> Provide a mechanism to get the text overflowing an interactive form fields
> area
> -------------------------------------------------------------------------------
>
> Key: PDFBOX-3413
> URL: https://issues.apache.org/jira/browse/PDFBOX-3413
> Project: PDFBox
> Issue Type: Improvement
> Components: AcroForm
> Affects Versions: 2.0.2, 2.0.3, 2.1.0
> Reporter: Maruan Sahyoun
> Priority: Minor
>
> When text is passed to a field which is longer than will fit in the visible
> area of the text portions of the text will be hidden. It would be good if to
> have a mechanism to inform the calling application about the text overflowing
> the area so that can be handled.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]