Solved

Print out annotated pages only from Adobe Acrobat X

Posted on 2011-09-07
17
355 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

632 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