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

(Hopefully) simple Javascript help

drrichar
Registered: Aug 7 2008
Posts: 5

I have an old form creation program called, "Informed" and have many old forms with data in them that I would like to save as simple pdf files. (Not forms at the present time)
The program offers two scripts that I would like to try and put together to accomplish this task. The first is:

// Set the current collection of the current document to all
// records of the current document.
var theDoc = Informed.currentDocument;
theDoc.currentCollection = theDoc.Record(ALL);

This will apparently put each document together as a collection (which is what I want to make into one single pdf file. This is an important step because the default action, when printing for instance, is to just print the top document. One has to tell the program you want all documents in the collection)

The second part is:

// Save pages 1 to 3 to a multipage PDF file at 144 dpi.
PDFSave.saveCurrentRecord ("c:\\temp\\myPDF.pdf", FAXG4_FORMAT, 1, 3, true, 2)

This was Informed's "savepdf" script. I don't need to specify a page range or have that particular format. Notice that they only wrote the script to save just a "CurrentRecord" and not a "collection."
I thought there should be a way to merge these two.
Any ideas would be appreciated. Thanks.

My Product Information:
Acrobat Pro 9.0, Macintosh
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
What's the original format of these documents?

some of what you are asking for can be done with automation scripts in Acrobat Professional.

For example, if a file type can be converted to a PDF by Acrobat Pro, then simply opening it in Acrobat will automatically convert it to pdf.

A pdf can be saved to a new name and a different file format. But you can't specify resolution. This is outside of what Acrobat JavaScript can do. It sounds like this program, informed, was converting your forms into images. PDF content is vector graphics so there is no resolution. Only images have a resolution.

As for creating collections, this can sort of be automated. However, in Acrobat 9 collections no longer exist. They are Portofollios now. And right now it's much better to just use the built in features for these.

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/]http://www.adobe.com/devnet/acrobat/[/url]

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

drrichar
Registered: Aug 7 2008
Posts: 5
Thank you for reading my post and responding.
The format of the files is (was) proprietary and belonged to Shana Corp.'s Informed Designer program. Adobe Pro won't open the file and yes it appears it was saving the files as images, as far as I can tell.

The problem with portfolio appears to me to be that it doesn't allow me to collect the same form with different data in it. For instance, my forms currently are progress notes for my medical practice. Each patient has a new note generated on each visit based upon the previous template. This is a collection of forms. Every time I try to reproduce this concept with Acrobat, the program tells me it will make all the data on each page of the form the same. I just cannot seem to find a way around this.