These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Print to File: why doesn't it work? (Acrobat Writer 8.1)

sgarazi
Registered: Jun 6 2008
Posts: 2

Hello,

I have a button, with which I want to print part of my PDF File to another PDF File.

I checked in the guide "Acrobat Javascript scripting reference". Unfortunately, the given code does not work.

var pp = this.getPrintParams();
pp.fileName = "/c/print/myDoc.prn";
this.print(pp);

It also does not work if I use"C:\temp\myPSDoc.prn". And not either if I replace "this.print" by simply "print".

Any good tip? Many thanks in advance for your help!

Cheers
Serge

My Product Information:
Acrobat Pro 8.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You need to also specify the name of the printer. The installed printers are listed in the "app.printerNames" property.

But there may be a better way to do this. Why do you want to part of the PDF file? Do you want extract pages? or flatten pages? There are functions for this in Acrobat JavaScript.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script