Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).


New Forum | Previous | Next | (P-PDF) Beginners


Topic: Printing Selected Pages Based on Option Button or Check Box
Conf: (P-PDF) Beginners, Msg: 120014
From: Snappy
Date: 10/11/2004 03:06 AM

OK, I've cobbled together some code that works for a range of pages, but I am still incapable of modifying the code to allow for selecting individual pages or additional ranges of pages. I've listed the basic code here with some minimal pages selections.

var f = this.getField("but1");

if(f.isBoxChecked(0))

this.print({bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 1});

else

if(f.isBoxChecked(1))
this.print({bUI: false, bSilent: true, bShrinkToFit: true, nStart: 2, nEnd: 3});

else

if(f.isBoxChecked(2))
this.print({bUI: false, bSilent: true, bShrinkToFit: true, nStart: 4, nEnd: 5});

else

app.alert("You must select an option before printing.");

The basic outline is 3 mutually exclusive option buttons with the same name "but1" and different export values. The test determines which button is selected by their index values then prints the selected page range using the parameters nStart and nEnd. If I try to add additional pages or ranges of pages to the print command I get a syntax error.

I'm no expert at doing this so the solution is probably obvious and I just haven't worked it out yet. Any help is greatly appreciated.

S.G.


PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.