Solved

Javascript Print Button in Acrobat

Posted on 2004-09-16
2
835 Views
Last Modified: 2006-11-17
I have set up a button to print a document, but it does not work.

The document with the button is at goodmorals.org/acrobat.

What is missing from the this.print javascript that makes the button fail?

Also, what is the simplest way to create a beveled button and one that bevels in when clicked on.

Thank you for your assistance.
0
Comment
Question by:goodmorals
[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
2 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 12079837
The problem is that Acrobat is counting pages differently than you are :-) The first page in a PDF file (as far as Acrobat is concerned) is page 0. You are printing page 1 to 1, which translated into more human understandable language is actually page 2 to 2. Your document only has one page, so Acrobat reports an error (which you can see when you open up the JavaScript console). Change your print command to
this.print(true, 0, 0, true);
and it should bring up the print dialog.

You can change the button face by assigning a button image (you can do this on the button properties dialog by selecting the Options tab, and then changing the Layout option. You then need to assign a PDF page as button image). You can however not modify the look of the button when it's being clicked on.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 250 total points
ID: 12079861
Actually, I was wrong: I just checked the "Options" tab again, and you can have different images for the different states of a button: not selected, mouse over and selected. Just set the "Behavior" setting to "Push", and then assign three (or two, if you don't care about the mouse over) PDF pages to the different icons.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Power PDF (http://www.nuance.com/for-business/document-imaging-and-scanning/power-pdf-converter/index.htm) is the newest product from the Document Imaging division of Nuance Communications (http://www.nuance.com/). It is available in two editions — …
Inserting page numbers in Portable Document Files not only enhances manageability but also makes them look professional. With numbered pages, the file appears more organized and it becomes easier to search for a particular page. The size and the vol…
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 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 …

707 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