Extract Annotated Pages ONLY

Please post any ideas or requests for new features here for the End User Version of PDF-XChange (printer Drivers)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, John - Tracker Supp, Ivan - Tracker Software, Tracker Supp-Stefan, Tracker - Clarion Support, moderators, Support Staff

josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Extract Annotated Pages ONLY

Post by josh katz »

This feature would be a huge time-saver for me. In my work, I often annotate PDF documents that have hundreds of pages. Going back and pulling only those pages on which I have commented is tedious, and I sometimes miss pages that have annotations. I am aware of the Summarize Comments feature - this is not a viable workaround, however, because it flattens the comments, and there is no feature to pull only the document pages (without the separate comment pages).

As a potential selling point, if this feature is incorporated I plan to ask the IT head for my 100+ practice group to provide product licenses for all of our members.

Best,
Josh
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK

Re: Extract Annotated Pages ONLY

Post by Will - Tracker Supp »

Hi Josh,

Thanks for the email - We've received quite a number of requests for this and similar items, so I've made a formal feature request for this. Please note that I still cannot guarantee the implementation of this feature, that is ultimately up to the development team.

Thanks,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Re: Extract Annotated Pages ONLY

Post by josh katz »

Thanks Will - much appreciated.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK

Re: Extract Annotated Pages ONLY

Post by Will - Tracker Supp »

:)
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Re: Extract Annotated Pages ONLY

Post by josh katz »

Just wanted to revive this feature request and reiterate that this feature would be very useful for my and my colleague's work. It continues to surprise me that of all of the complex comment extraction features, this is not one of them.

Thanks,
J
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Extract Annotated Pages ONLY

Post by Tracker Supp-Stefan »

Hi All,

The feature is not yet available e.g. in "Document -> Extract Pages", but here is a small script that will go through a file, and remove all the pages that do not have annotations on them. You can then save the reminder (which will be equivalent to "extract pages with annotations only") under a new file name.

Code: Select all

for (var i = this.numPages-1; i>0; i--){
  var annots = this.getAnnots({nPage: i})
  if (annots == null) {
    this.deletePages({nStart:i, nEnd:i})
  }
}
To execute that code - open the JS console (Ctrl+J) and paste it there, then hit the run button. Make sure to not overwrite the original file, as if you do and close the Editor - the page removal will be permanent and non reversible!

Regards,
Stefan
josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Re: Extract Annotated Pages ONLY

Post by josh katz »

This is great! Is there a way to save this code as a new button/command?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: Extract Annotated Pages ONLY

Post by Tracker Supp-Stefan »

Hello Josh,

Yes there is - please see this topic on how you can add custom buttons to the Editor:
https://forum.pdf-xchange.com/ ... 62&t=28256

Regards,
Stefan
josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Re: Extract Annotated Pages ONLY

Post by josh katz »

Thanks Stefan. I followed the instructions precisely but the button is not showing up. Do you know where it should be (or how I can activate it)?
User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1645
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island

Re: Extract Annotated Pages ONLY

Post by Patrick-Tracker Supp »

Hi Josh,

It looks like there was a tiny mistake in the instructions. Please make sure you add the JavaScript file to C:\Program Files\Tracker Software\PDF Editor\JavaScripts

I hope this helps!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Cheers,

Patrick Charest
Tracker Support North America
josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Re: Extract Annotated Pages ONLY

Post by josh katz »

Yes, I did do this (I was able to figure it out from a related thread). Still no luck!
josh katz
User
Posts: 7
Joined: Mon Mar 31, 2014 7:52 pm

Re: Extract Annotated Pages ONLY

Post by josh katz »

I figured it out - it looks like I needed to add some additional code describing the button/function. Here is what I used:

Code: Select all

function ExtractCPO()
{
for (var i = this.numPages-1; i>0; i--){
  var annots = this.getAnnots({nPage: i})
  if (annots == null) {
    this.deletePages({nStart:i, nEnd:i})
  }
}
}

app.addToolButton({
cName: "ExtractCPOs",
// oIcon: oIcon,
cExec: "ExtractCPO()",
cTooltext: "Extract CPOs",
cEnable: true,
nPos: 0
});
User avatar
Patrick-Tracker Supp
Site Admin
Posts: 1645
Joined: Thu Mar 27, 2014 6:14 pm
Location: Vancouver Island

Re: Extract Annotated Pages ONLY

Post by Patrick-Tracker Supp »

Hi Josh,

Well done! Thanks for posting the script too. I am sure that will prove useful to others as well.

Cheers!
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Cheers,

Patrick Charest
Tracker Support North America
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Extract Annotated Pages ONLY

Post by TrackerSupp-Daniel »

Hello everyone,
I am happy to announce that this function is now available in the PDF-XChange Editor from build 327 and up. Simply open the thumbnails pane (Ctrl+T) and from the options menu, hover over select and click pages with comments:
DMKB18November725.png
After than simply open the print or extract dialog, and choose the "Selected pages" option.
DMKB18November726.png
Enjoy!
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com