Page 1 of 1

How to extract comments without exporting file and UI

Posted: Thu Jul 07, 2016 10:00 am
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?

Re: How to extract comments without exporting file and UI

Posted: Thu Jul 07, 2016 10:46 am
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

Re: How to extract comments without exporting file and UI

Posted: Fri Jul 08, 2016 3:02 am
by crimsonlogic
Thanks for your information.
Is there any C# example for getting annotation page by page with PDFXCoreAPI?

Re: How to extract comments without exporting file and UI

Posted: Fri Jul 08, 2016 2:07 pm
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

Re: How to extract comments without exporting file and UI

Posted: Mon Jul 11, 2016 2:04 am
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?

Re: How to extract comments without exporting file and UI

Posted: Mon Jul 11, 2016 6:38 am
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?

Re: How to extract comments without exporting file and UI

Posted: Tue Jul 12, 2016 2:43 am
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?

Re: How to extract comments without exporting file and UI

Posted: Tue Jul 12, 2016 3:39 am
by crimsonlogic
Anyway, I got it, thanks

Re: How to extract comments without exporting file and UI

Posted: Tue Jul 12, 2016 6:21 am
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.