Solved

Automatic PDF printing

Posted on 2009-04-07
2
808 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 May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

The ability to edit PDF documents can be useful, however it may not be a straight forward process. Many non-technical people don't realise that a PDF document is basically an image rather than a text file, even if it contains nothing but text. If…
Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
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…

752 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