Solved

Automatic PDF printing

Posted on 2009-04-07
2
817 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

*Adobe Acrobat 9 was used for this article.  Particular steps may vary depending on software versions. Adobe Acrobat has many, many variables that my be utilized to customize your forms for clarity and ease of use. The Form Editing Tool will be y…
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

626 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