Solved

Print out annotated pages only from Adobe Acrobat X

Posted on 2011-09-07
17
344 Views
Last Modified: 2013-11-28
So lets say I have a 500 page document, and I annotated 30 random pages... is there anyway to print just those 30 pages?
0
Comment
Question by:Michaelwr90
  • 8
  • 7
17 Comments
 
LVL 6

Expert Comment

by:c1nmo
ID: 36499714
don't know of a way to do it through the ui, but it could be achieved using the acrobat sdk or 3rd party pdf sdk
0
 

Author Comment

by:Michaelwr90
ID: 36499722
Yeah, I know there has to be some way to achieve this.   Any help on how to would be greatly appreciated.
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 36499755
0
 

Author Comment

by:Michaelwr90
ID: 36499757
@c1nmo

I saw that, but no I don't own an iPad :(
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 36499840
I've used this library a fair bit:

http://www.quickpdflibrary.com/help/quickpdf/AnnotationCount.php

You could check the annotation count of each page, copy the page to a new file if it has any annotations, then print the new file once you've checked/copied all pages.
0
 

Author Comment

by:Michaelwr90
ID: 36499841
c1nmo, where exactly do I use that code at? I've never dealt with coding in Adobe before. How do I open the SDK?
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 36499866
This is a com / dotnet library that can be used from vb / c# etc.  I'm sure something similar could be achieved with the adobe sdk, I've used the javascript interface in the past:

http://www.adobe.com/devnet/acrobat/javascript.html

Is this just a one off requirement or is it being built into a system?

0
 

Author Comment

by:Michaelwr90
ID: 36499888
If I could put it into a system that I can constantly keep using like a button, that would be awesome.

I will check out that link in around 20 minutes, need to put the kids to rest.

Thanks a whole bunch.
0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:Michaelwr90
ID: 36500028
I create a summary of comments and I just print out the odd pages, however, they have these annoying sequence numbers and they can't seem to be removed.
0
 

Author Comment

by:Michaelwr90
ID: 36500169
The comment summary doesn't even work...

I don't know why Adobe doesn't have this implemented.


When I print out a sticky note normally, it shows all the text next to it... I need it to be like that.  Man this is giving me a headache! :)
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 36500364
Put the following in a js file e.g. PrintAnnotatedPages.js and place it in acrobat's javascript folder, for 6.0 it is C:\program files\Adobe\Acrobat 6.0\Acrobat\Javascripts.  (This is the only version I have to test).  It will add an option to acrobat's file menu called 'Print Annotated Pages', this option will go through the current document and print any annotated pages to your default printer without prompting (one at a time).  I believe in acrobat 7 and higher you need to add some security code to this, I'll post what I think this is in my next post to keep it separate.

//////////////////////////////////////////////////////
//
// Print all pages of current document with annotation on
//
//
//////////////////////////////////////////////
//
//  ** GENERAL INSTALLATION INSTRUCTIONS:
//
//  This Acrobat Automation Script will only work when
//  placed in one of the Acrobat JavaScript Folders. Execute
//  the following code from the Acrobat JavaScript Console to find
//  the location of the JavaScript folders.
//
//  To display the Acrobat JavaScript Console use Ctrl+J on
//  Windows and Command+J on the Mac, does not work properly on newer Mac Books
//
//      app.getPath("user","javascript");
//
//      app.getPath("app","javascript");
//
//  You may place this script file in either one of the folders.
//  However, the "user" folder is shared by both Acrobat and Reader
//  Placing the file in the user folder will make the menu item
//  availible to both Acrobat and Reader
//

///////
// Print annotated pages
//
var PrintAnnotatedPages = (function()
{
      for(var pg=1; pg<this.numPages; pg++)
      {
      var countAnnots=this.getAnnots();
      if (countAnnots.length>0)
            {
            this.print({
                bUI: false,
                nStart: pg,
                nEnd: pg,
                bSilent: true
                });


            }
      }
});

///////
//  User Interface, places menu item on File menu
//
app.addMenuItem({cName:"Print &Annotated Pages",
                 cParent:"File",
                 nPos:"Close",
                 cExec:"PrintAnnotatedPages()",
                 cEnable:"event.rc = app.doc != null"
});
0
 
LVL 6

Accepted Solution

by:
c1nmo earned 500 total points
ID: 36500373
Here is what I think the js file should look like in Acrobat 7 and higher (PS. I should mention, adapted from a solution by Thom Parker, WindJack Solutions, Inc.):


//////////////////////////////////////////////////////
//
// Print all pages of current document with annotation on
//
//
//////////////////////////////////////////////
//
//  ** GENERAL INSTALLATION INSTRUCTIONS:
//
//  This Acrobat Automation Script will only work when
//  placed in one of the Acrobat JavaScript Folders. Execute
//  the following code from the Acrobat JavaScript Console to find
//  the location of the JavaScript folders.
//
//  To display the Acrobat JavaScript Console use Ctrl+J on
//  Windows and Command+J on the Mac, does not work properly on newer Mac Books
//
//      app.getPath("user","javascript");
//
//      app.getPath("app","javascript");
//
//  You may place this script file in either one of the folders.
//  However, the "user" folder is shared by both Acrobat and Reader
//  Placing the file in the user folder will make the menu item
//  availible to both Acrobat and Reader
//

///////
// Print annotated pages
//
var PrintAnnotatedPages = app.trustedFunction(function()
{
app.beginPriv();
      for(var pg=1; pg<this.numPages; pg++)
      {
      var countAnnots=this.getAnnots();
      if (countAnnots.length>0)
            {
            this.print({
                bUI: false,
                nStart: pg,
                nEnd: pg,
                bSilent: true
                });


            }
      }
app.endPriv();
});

///////
//  User Interface, places menu item on File menu
//
app.addMenuItem({cName:"Print &Annotated Pages",
                 cParent:"File",
                 nPos:"Close",
                 cExec:"PrintAnnotatedPages()",
                 cEnable:"event.rc = app.doc != null"
});
0
 

Author Comment

by:Michaelwr90
ID: 36500406
I use Acrobat 10.0, I tried what was in your last post.

It opened my default printer (Adobe PDF at this point) and it printed the annotated page, but it didn't keep the annotations on there.  It also kept prompting me to keep printing and saving (like a loop).

Other than that, I think I/We can work from this and get this to work.. this was insanely helpful!! I'm up now looking / modifying the code.
0
 
LVL 6

Expert Comment

by:c1nmo
ID: 36500428
Worked ok other than creating single page prints in 6, obviously behaving differently in Acrobat 10, getPrintParams may be of use?

var pp = this.getPrintParams();
pp.firstPage = 0;
pp.lastPage = 9;
this.print(pp);
0
 

Author Comment

by:Michaelwr90
ID: 36500442
Trying that, I'm noob with Javascript, especially for Acrobat, I'll place it some places and try to execute it from different parts.
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 36929384
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

757 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