How to extract comments without exporting file and UI

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

How to extract comments without exporting file and UI

Post by crimsonlogic »

Hi Tracker Team,

Currently, I'm using DoVerb with "SummarizeAnnots" to get comments summary.
But it will create a physical file and have to load pdf in viewer.

I'm doing a simple search engine for searching both content and comments, is there any way that can extract comment page by page like extract normal content?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17815
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: How to extract comments without exporting file and UI

Post by Tracker Supp-Stefan »

Hello Crimsonlogic,

Our PDF Tools SDK is a bit older and might not have all the features you need. Is it an option for you to use the Core API instead? I am confident it will be faster and easier to achieve this with the Core API than with the Tools SDK (if at all possible with Tools).

You can download and give the Core API a try here:
https://www.pdf-xchange.com/produc ... re-api-sdk

Regards,
Stefan
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Re: How to extract comments without exporting file and UI

Post by crimsonlogic »

Thanks for your information.
Is there any C# example for getting annotation page by page with PDFXCoreAPI?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to extract comments without exporting file and UI

Post by Sasha - Tracker Dev Team »

Hello crisonlogic,

Well, you can get the required annotation properties from the IPXC_Annotation interface:
https://sdkhelp.pdf-xchange.com/vie ... Annotation
You can get all of the page's annotations by using
https://sdkhelp.pdf-xchange.com/vie ... e_GetAnnot
https://sdkhelp.pdf-xchange.com/vie ... nnotsCount

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Re: How to extract comments without exporting file and UI

Post by crimsonlogic »

According to the document, IPXC_Document is the interface of object of PDF-XChange Editor SDK.
So I have to use PDF-XChange Editor SDK, not only Core API SDK, right?
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Re: How to extract comments without exporting file and UI

Post by crimsonlogic »

I am following this post for my purpose.
https://forum.pdf-xchange.com/ ... ge#p101345

According document https://sdkhelp.pdf-xchange.com/view/PXV:IPXC_Pages
I can get correct Count property, but when I try to use pages.Item, will get build error.

Any suggestion?
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Re: How to extract comments without exporting file and UI

Post by crimsonlogic »

My code:

Code: Select all

PDFXCoreAPI.PXC_Inst g_Inst = new PDFXCoreAPI.PXC_Inst();
            g_Inst.Init(mykey);

            IPXC_Document pDoc =g_Inst.OpenDocumentFromFile(inputfile,null);
            
            IPXC_Pages pages = pDoc.Pages;
var pageCount=pages.Count;
I can get the page count, but how to do next to get annotation of every page?
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Re: How to extract comments without exporting file and UI

Post by crimsonlogic »

Anyway, I got it, thanks
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: How to extract comments without exporting file and UI

Post by Sasha - Tracker Dev Team »

Hello crimsonlogic,

Sorry for the late reply. Glad you found a solution. You can search the Editor SDK or the CoreAPI SDK forums for the keywords you need - right now they contain answers to many questions.

Cheers,
Alex.
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply