Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Print out annotated pages only from Adobe Acrobat X

Posted on 2011-09-07
17
Medium Priority
?
358 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

688 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