These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Linespacing in multiline textfield

lnong
Registered: Oct 4 2007
Posts: 2

I've been googling for an answer to my problem, but I haven't found a solution that works, so I have to ask the experts here.

I'm using the ActivePDF ToolKit to programmatically fill in form fields of a PDF document using data from my database. I got all this to work perfectly except that when it fills in a Multiline Textfield, the linespacing within this field is not the same as the linespacing of the static text on rest of the document.

I have not been able to find a way (programmatically nor at design time) to set the linespacing inside a multiline textbox to, say, exactly 7pt. I did not see the option to set linespacing from the textfield's Properties box.

Then I thought I could do it using the Format property by adding some Acrobat javascript. However, I search through the whole Acrobat Javascript API document (http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf) and I could not find an "Field.linespacing" property for the text field.

Then I thought I could do it using Rich Text Formatting somehow after enabling the Rich Text Format option for the textfield. I've never worked with RTF before, so I don't know how I'm supposed to use it but I gave it a shot. After reading up a little bit on the RTF syntax, I came up with this expression that I tried printing into the multiline textfield:

{\pard\sl-7\slmult0 THIS IS THE TEXT I WANT TO PRINT \par}

I thought that enabling Rich Text Format for this text field would allow it to accept the RTF formatting command above and just print out "THIS IS THE TEXT I WANT TO PRINT" with smaller linespacing. But that didnt work. It printed the whole original expression into the text field. I guess I'm not using this RTF feature correctly?

To me, linespacing should be a basic feature of any document creation process, but I cant understand why Acrobat does not support it. Anyway, so I'm stuck. Any suggestions or workarounds would be greatly appreciated. Thanks.

jenniferbunecke
Registered: Jul 29 2009
Posts: 35
I am having the same problem, but haven't come up with a solution. I am working with Acrobat 8 professional. Any ideas??? I agree - this should be pretty basic.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
The Rich Text field property is not the same as the Rich Text Format, RTF, for a a file type. You might try looking at the superscript and subscript properties of the 'span' object, but this is a very limited field formatting feature.

George Kaiser