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

Printing Specific Pages

frogtography
Registered: Jun 2 2009
Posts: 4

Hello,
I'm working on a 7 page document with multiple text fields. The 1st 2 pages are text fields that are Set up to auto-fill labels on the remaining pages (these are auction labels for teh local fish club) I would like to script a set of buttons that can be used to print only specific pages. i.e. one button prints pgs 1-3, (the info pages adn the corresponding labels on teh first page) without printing any remaining pages that have no data filled in. Is this something that can be done?

My Product Information:
Acrobat Pro 8.1.2, Macintosh
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You can do it with a simple JavaScript that makes use of the Document's print() function, to which you can specify which pages to print.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Freelancer
Registered: May 26 2009
Posts: 71
Hi,

check this :

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=18580

No possibility to print separate pages like 1, 3, 6-11 with javascript...

Freelancer

According to most IT HelpDesk people, the most common reason for user error (regardless of Operating System) is ID 10T.

try67
Expert
Registered: Oct 30 2008
Posts: 2398
It should be possible, using either multiple calls to print() or by extracting the pages to a new document and then printing that one.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Freelancer
Registered: May 26 2009
Posts: 71
Jep,

I ment that it is not possible to make in ONE print queue
with Acrobat Reader, ie. you want to print some pages
as new pdf document...
This is definitely a serious limitation in javascript printing.

Of course if one uses Acrobat Standard or Pro, one can just
make the extraction and print, as you suggested.

Freelancer

According to most IT HelpDesk people, the most common reason for user error (regardless of Operating System) is ID 10T.

frogtography
Registered: Jun 2 2009
Posts: 4
I guess what i'm trying to do is I have a document that is 7 pages. The first two are where you enter teh data. The other 5 are labels that go on auction items. If you only have 20 items and print all 7 pages you are wasting the last 3 pages. I want to be able to print for example pages 1 through 3 or pages 1 through 4 depending on how many items one has
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can print a range of pages. The JavaScript print fucntion includes inputs for a start and stop page number. Here's the code for printing pages 1 thru 4
  this.print(true,0,3);
In JavaScript the page numbers are 0 based, so page 4 on the UI is page 3 in JavaScript.


Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

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