Solved

Automatic PDF printing

Posted on 2009-04-07
2
795 Views
Last Modified: 2012-05-06
Does anyone know any program to automatise pdf printing. I have program where i print maybe 200 different documents. This program print these all 200 documents automatically but my pdf printer asks the name for each document that 200 times. These name could be just like doc1, doc2, doc3... doc200.
0
Comment
Question by:thaapavuori
2 Comments
 
LVL 12

Accepted Solution

by:
GlennHarris earned 250 total points
ID: 24092816
Try this:
You can create single pdfs from within acrobat by selecting the Advanced menu > Document Processing > Batch Processing command. Select New Sequence, then name it, Click the Select commands button, then Add Execute Javascript, then click Edit, then paste this code
var basePath = "/c/temp/out";
var baseName = "page_";
for (var i=0; i<this.numPages; i++)
{
    var thePath = basePath + "/" + baseName + (i+1) + ".pdf";
console.println(thePath);
    // extract the page into it's own document
    this.extractPages(i, i, thePath);
}

(You may want to modify the output directory "basePath", just keep in mind that you have to use the drive letter as first "directory" in the path).
0
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 250 total points
ID: 24095363
Yes, you can automate converting documents from any format to PDF by printing to the Adobe PDF printer - and you do have control over the filename. It requires you to set a registry key before you print.

Take a look at the Acrobat SDK documentation: http://www.adobe.com/devnet/acrobat/ - click on the "Documentation" tab for access to all the documents. You want to access the "Distiller API Reference"

This page describes how to programatically control the output filename:
http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/Distiller_WinIntro.61.11.html


It's a bit tricky, because you need to figure out how exactly the registry key needs to look like. It depends on the name of your application.

Also, remember that you have to do that before you print every single file.



0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

*Adobe Acrobat 9 was used for this article. Particular steps may vary depending on software versions. 1. Create a framework of your form in Word, leaving space where you’d ultimately like the Adobe fields to appear.  (Note: I use the blank lines …
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question