Hello everyone,
I have the following scenario:
I have a web application that generates an excel file with several rows of information.
I tried to export from excel to .txt (tab delimited file) and import it into the form fields my pdf file - all good so far.
This would all be hunky dory if the excelfine only contained one row, however it contains 3000 rows which I would love to generate and print 3000 pdf files.
How can I accomplish this?
Hoping for the best..
/Niklas
To handle so much data, and silent printing you'll need to write an automation script. This is something you can develop and run from the console window. Or if you need to reuse the script you could place it into a toolbar button or menu item. But the key bit is that in order to get the features you want (data import and silent print) the script has to be in a privileged location outside of the document.
The JavaScript function for importing from a tab delimited file is "doc.importTextData()", it has an imput for selecting a row and returns a number that lets the script know that the end has been reached.
Just run this function in a loop with the print function. You may run into timing problems because the import is fast and the print is slow, and neither is a blocking function. To solve this you might need to force a delay in the code.
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.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window[/b][/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script