Acrobat Javascript Question regarding firstPage

Posted on 2004-11-24
Last Modified: 2008-01-16
Hi I am trying to do an automatic print using printparams and i am sending 2 seperate jobs. The first job i want to print both pages of the 2 page pdf and the second job i want to print only the second page of the 2 pages which is being sent to a virtual tif printer. My problem is it keeps printing only the first page instead of just the second. Take a look at my code and see if you can decifer why.

var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;
pp.firstPage = 1;
pp.lastPage = 2;
pp.printerName = "up-middle";

var pn = this.getPrintParams();
pn.firstPage = 2;
pn.lastPage = 2;
pn.interactive = pn.constants.interactionLevel.automatic;
pn.printerName = "Bankruptcy and Patriot";

Question by:jerrycsakanyjr
    LVL 44

    Accepted Solution

    Acrobat's page numbering is zero based. I haven't tried it, but I'm pretty confident that if you use firstPage=1/firstPage=1 that you will get the second page of the job.
    LVL 44

    Expert Comment

    by:Karl Heinz Kremer
    Any luck?

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (…
    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 first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now