Ah I see... Okay, thanks for the guidance. I'll give what you suggested a shot and reply if I can figure something out.
On Mon, Dec 16, 2019 at 8:57 PM Tilman Hausherr <thaush...@t-online.de> wrote: > 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. > > 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 > > -- *Jesse Zhou* Engineering | Employee Lifecycle | 408-504-6225 Gusto | The people platform built for small businesses Jesse works with Gusto