pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maruan Sahyoun <sahy...@fileaffairs.de>
Subject Re: Problem with appearance construction when newline character included in field value
Date Thu, 24 Aug 2017 18:19:32 GMT
Hi Scott,

> Am 24.08.2017 um 17:53 schrieb Scott Coldwell <scott.coldwell@hrworx.com>:
> 
> https://www.dropbox.com/s/aauv4rwnb65qj3x/TestI9.pdf?dl=0 <https://www.dropbox.com/s/aauv4rwnb65qj3x/TestI9.pdf?dl=0>
> 
> The field in question is Signature of Employee (employee.signature) on the first page.
> 
> We may be able to do away with the newline. We’re migrating an app from itext and I
was trying to keep the changes to a minimum and the newline is part of their standard signature
content.

I looked at the form and I'm a little uncertain what to do as there are two options:

a) keeping everything as is and setting NeedAppearances to true to enforce Adobe to generate
the appearance stream there is a multiline output
b) opening the form in Adobe Reader without setting NeedAppearances and manually editing the
text there is a single line output i.e. the newline is not taken into account
c) setting the field property to multiline and generating the appearance stream using Adobe
Reader there is multiline output but the font is much smaller than would be with option a)

So for a single line field the question is if we'd like to replikate a) or b)
For multiline - as I've already written before - we currently do not support auto scaling
text

The onyl short term fix as of now is to either drop the newline or - if the user is using
Adobe Reader or Acrobat to fill the form - set PDAcroForm.setNeedAppearances(true). The later
will be a change to the document so even if the user is not changing anything he will be asked
to save the form when closing.

BR
Maruan

> 
>> On Aug 24, 2017, at 3:19 AM, Maruan Sahyoun <sahyoun@fileaffairs.de> wrote:
>> 
>> 
>> 
>>> Am 24.08.2017 um 09:10 schrieb Scott Coldwell <scott.coldwell@hrworx.com <mailto:scott.coldwell@hrworx.com>>:
>>> 
>>> Tried with both 2.0.6 and 2.0.7. Also tried with multiline on and off. Different
results with the multiline flag as to what was visible without focus, but neither was correct.
>>> 
>> 
>> Would it be possible to get a sample form? BTW - for multiline and font size auto
we don't scale the font but set it to 12pt. So this is a known limitation.
>> 
>> For single line could you just replace the newline with space or is it important
to have the newline as part of the data?
>> 
>> 
>> 
>>>> On Aug 24, 2017, at 1:49 AM, Maruan Sahyoun <sahyoun@fileaffairs.de>
wrote:
>>>> 
>>>> Hi Scott,
>>>> 
>>>> 
>>>>> Am 24.08.2017 um 03:01 schrieb Scott Coldwell <scott.coldwell@hrworx.com>:
>>>>> 
>>>>> Maruan/Tilman,
>>>>> 
>>>>> We’re having an issue with a text field where the value includes a
“\n”.  The field does not show the value properly until you click into the field.  This
has been an issue in the past with the appearance construction so that’s my guess as to
what’s happening.  Additional note, the field is set to auto font size (0).  I’m going
to file a bug report, but is there a workaround I can use in the meantime to correct the appearance?
>>>>> 
>>>> 
>>>> is the field set to be multiline? Which PDFBox version are you using?
>>>> 
>>>> BR
>>>> Maruan
>>>> 
>>>>> Thanks,
>>>>> Scott
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>>>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org <mailto:users-unsubscribe@pdfbox.apache.org>
>>> For additional commands, e-mail: users-help@pdfbox.apache.org <mailto:users-help@pdfbox.apache.org>
>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org <mailto:users-unsubscribe@pdfbox.apache.org>
>> For additional commands, e-mail: users-help@pdfbox.apache.org <mailto:users-help@pdfbox.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message