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

Insert a carriage return or line end into a multi line field

miller101
Registered: Jul 11 2007
Posts: 2

I need to insert a carriage return/line feed into a multi line field in Acrobat 8 Pro? For example: On a business card there might be a 2 line address that I want to concatenate from 2 fields (address 1 & address2) but have acrobat make the line end so that I can have consistent line spacing in my forms. The format might look like (address1 + CR + address2). The process occurs on my website when I populate the fields from a form using "Persits aspPDF". So the simplest question would be what character would create the carriage return? I tried inserting a \r but no success. Any ideas?

My Product Information:
Acrobat Pro 8.0999999999999996447286321199499070644378662109375, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Look in any core JavaScript Reference. I'd recomend the O'Reilly book with the Rhino on it.

In a JavaScript string the line feed is an escaped n, i.e. "\n" and a cariage return is an escaped r, i.e. "\r".
Different editors and platforms use different line endings, but the Line Feed is the most consistantly respected.
So, "hello\nWorld", is printed as two lines in Acrobat/PDF.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script