• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 831
  • Last Modified:

Automatic PDF printing

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.
2 Solutions
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";
    // 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).
Karl Heinz KremerCommented:
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:

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now