> Am 17.12.2019 um 05:45 schrieb Jesse Zhou:
> > Unfortunately, in the application I'm working in, I have to keep the
> > rectangle the same size to maintain parity with another part of the
> > application.
> > 
> > I see that in 9.4.2 of the PDF Spec, there's a section on "text
> > positioning" that looks promising (particularly the `Td` operator?). Is
> > there any easy way to modify that, maybe in the default appearances string?
> 
> IIRC the /DA content is not used completely, it is parsed for font, 
> color and size. So you would have to create the appearance stream 
> yourself. This is done in AppearanceGeneratorHelper.java. You would have 
> to use your own (by overriding constructAppearances() and constructing 
> your field with the 3 parameter constructor "PDTextField(PDAcroForm 
> acroForm, COSDictionary field, PDNonTerminalField parent)"), or change 
> the constructed appearance stream directly. I suggest you look at the 
> content with PDFDebugger to see what it is made of, you can find the 
> operators in the segment "operator summary". However this means that as 
> soon as somebody else opens the file and clicks on the text and changes 
> it, it will no longer fit in. And all this is really advanced, this 
> won't be done in an hour or two IMHO.

just to confirm as Tilman pointed out there is currently no way to set that. 
Reason is that the formatting was done to replicate
Acrobat which also doesn't have a way to set that. Line height is a function of 
the font size. Even if we implement that using
other applications to edit the form afterwards might overwrite that. So 
typically you should reduce the font size.

BR
Maruan


> 
> Tilman
> 
> 
> > On Mon, Dec 16, 2019 at 8:21 PM Tilman Hausherr <thaush...@t-online.de>
> > wrote:
> > 
> > > Hi,
> > > 
> > > Change the rectangle of the annotation widget(s).
> > > 
> > > Tilman
> > > 
> > > Am 17.12.2019 um 02:31 schrieb Jesse Zhou:
> > > > Hello,
> > > > 
> > > > I'm trying to set the line height in a PDTextField. I'm able to figure
> > > out
> > > > how to configure the font size, but not the line height.
> > > > 
> > > > I'm doing this because we need to be able to fit more text into the
> > > > PDTextField with the multiline bit set. Any suggestions of how to
> > > > accomplish this?
> > > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> > > For additional commands, e-mail: users-h...@pdfbox.apache.org
> > > 
> > > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
> For additional commands, e-mail: users-h...@pdfbox.apache.org
> 
-- 
Maruan Sahyoun

FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen

Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
sahy...@fileaffairs.de
www.fileaffairs.de

Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827


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

Reply via email to