PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)
Moderators:TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
We're having an issue getting the text content of highlight annotations in PDF files. We're using javascript to parse the annotations and their properties. All other properties seem correct, i..e page, color and quads. But the contents and richContents properties are always empty, and we're not sure why. We're hoping you can help. This is the javascript we are using to log the annotation properties to console:
var annots=this.getAnnots();
if(annots!=null){
for(var i=0;i<annots.length;i++){
var ann = annots[i];
var p = ann.getProps();
for ( o in p )
console.println( o + " : " + p[o] );
}
}
If it isn't possible to use the contents or richContents properties, is there another way to get the text of the highlight annotations? We've tried using
It is possible to get richContent from highlight annotation when there is text. But if there are no text you will have an empty array instead.
When you create new highlight annotation, highlighted text is not automatically copied as a content of the annotation.
The Editor has an option "Copy selected text into Highlight, Cross-Out, and Underline comment pop-ups" on Editor's preferences "Commenting" page.
HTH
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Ivan - Tracker Software wrote:It is possible to get richContent from highlight annotation when there is text. But if there are no text you will have an empty array instead.
When you create new highlight annotation, highlighted text is not automatically copied as a content of the annotation.
The Editor has an option "Copy selected text into Highlight, Cross-Out, and Underline comment pop-ups" on Editor's preferences "Commenting" page.