Textextraction also for comments

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Textextraction also for comments

Post by cew »

Hi,

is it possible get the text comment texts using textextraction?

Best regards
cew
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Textextraction also for comments

Post by Vasyl - PDF-XChange »

It's possible, by Java-Scripts..
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Textextraction also for comments

Post by cew »

Vasyl-Tracker Dev Team wrote:It's possible, by Java-Scripts..
Are there any c# examples how to do this using JS?

I think for executing JS it is necessary that the document is loaded in the viewer, right?
How do I get the annotation texts just like using text extraction without any UI?

Best
cew
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Textextraction also for comments

Post by Stefan - PDF-XChange »

Hello Cew,

In the Viewer SDK Installation folder
(by default: C:\Program Files\Tracker Software\PDF-XChange Viewer SDK\Examples\C#Examples )
There is a JavaScript folder - which will show you how to execute JS code inside our Viewer AX.
Unfortunately this will require loading the file indeed - you can still perform the JS without user intervention, but you will need to load the file.

Best,
Stefan
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Textextraction also for comments

Post by cew »

Tracker Supp-Stefan wrote:Hello Cew,
Unfortunately this will require loading the file indeed - you can still perform the JS without user intervention, but you will need to load the file.
No way to extract the texts without UI? :cry:

Best,
cew
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Textextraction also for comments

Post by Stefan - PDF-XChange »

Hello cew,

You could have our Viewer AX sized to 1 by 1 pixel, but you will need to have it inside your application, and load a document before you can execute JS on it. So yes - UI will be needed - even if there is no interaction needed by the user :(

Best,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Textextraction also for comments

Post by Vasyl - PDF-XChange »

No way to extract the texts without UI?
You may use hidden control also...
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Textextraction also for comments

Post by cew »

No UI means the use of a method like PXCp_ReadDocumentW.
In the extraction scenario is not active (visible or hidden) viewer available.

Best
cew
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Textextraction also for comments

Post by Stefan - PDF-XChange »

Hello Cew,

I am afraid that the answer from our devs is that there is no way to extract comments using xcpro (i.e. without UI).

Best,
Stefan
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Textextraction also for comments

Post by cew »

I'm afraid too :|

What about V3?

Best
cew
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Textextraction also for comments

Post by John - Tracker Supp »

It will be possible in V3 - but for sure you will need to enumurate the comments and retrieve the text for each comment found on the page to proceed - for example here is some simple Pseudo code which gives an idea of what it 'should' look like ....

yes, but for sure developer will need to enumerate comment in the document and get text from each of found comments;
pseudo code will be

Code: Select all

CComPtr<IPXC_Page> page;
foreach(page in document)
{
  CComPtr<IPXC_Annotation> comment;
  foreach (comment in page)
  {
    CComBSTR text = comment->Context;
  }
}
Hope that 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.

Best regards
Tracker Support
http://www.tracker-software.com
cew
User
Posts: 213
Joined: Tue Feb 01, 2011 8:14 am

Re: Textextraction also for comments

Post by cew »

Great, hope V3 will be released soon :)
Thank you

Best regards,
cew
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Textextraction also for comments

Post by Stefan - PDF-XChange »

We are hard working on it cew! :)

Best,
Stefan