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

.i want to export the data from pdf as RTF using script

humayoo
Registered: May 18 2009
Posts: 12

hi,

1.i want to export the data from pdf as RTF using script.

2. i want to export the data of one particular field(say data of textfield1) as RTF using acrobat script.

how can we do it ? if any body has any idea or solution .please share with me.

thanks
Humayoo

My Product Information:
Acrobat Pro Extended 9.1.3, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
When exporting data Acrobat will only include the raw text data, All formatting is lost. So if you want to preserver the formating you'll need to save it explicitly with a scirpt.

How this is done depends on the forms technology you're using and what it is that you want to do. For example, in an AcroForm Rich text is implimented with a series of Span objects, where each span has properties such as the font type, size, and color. The spans are accessed through the "field.richValue" property and can the converted to XML text with the "util.spansToXML()" function.

If this is a LiveCycle form then the RichText is formatted in a different way, it's already XML. RTF is really a very generic term. "RTF files" are different from RTF used in form fields.
If you need it in a different RTF format you'll probably have to write the code to convert it. However, depending on the enviroment this is operating in and what exactly you want to do there might be some other options.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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