Maruan, Letting adobe acrobat fix the appearance isn’t an option for us. We have to flatten the forms when we generate them. There is also the potential of users entering text with newlines for remark/comment fields on some of our forms. I suppose I can temporarily replace all newlines with a space from any values before we set it on the field, but this isn’t ideal. Is there a plan to correct the appearance generation at some point? I’m happy to open an issue if there isn’t one already. I’m also happy to look at the itext code to see what they’re doing since this all worked fine with itext.
Thanks, Scott > On Aug 24, 2017, at 2:19 PM, Maruan Sahyoun <[email protected]> wrote: > > Hi Scott, > >> Am 24.08.2017 um 17:53 schrieb Scott Coldwell <[email protected]>: >> >> 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 <[email protected]> wrote: >>> >>> >>> >>>> Am 24.08.2017 um 09:10 schrieb Scott Coldwell <[email protected] >>>> <mailto:[email protected]>>: >>>> >>>> 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 <[email protected]> >>>>> wrote: >>>>> >>>>> Hi Scott, >>>>> >>>>> >>>>>> Am 24.08.2017 um 03:01 schrieb Scott Coldwell >>>>>> <[email protected]>: >>>>>> >>>>>> 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: [email protected] >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> <mailto:[email protected]> >>>> For additional commands, e-mail: [email protected] >>>> <mailto:[email protected]> >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> <mailto:[email protected]> >>> For additional commands, e-mail: [email protected] >>> <mailto:[email protected]> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

