Retrieve PDF highlights data and load selection in another PDF on a different device?

Q: Is there any way to retrieve highlight data from pdf to load these metadata in another device (pdf)?


I am not very clear regarding your requirements and it would help if you could elaborate on what you would like to do.

PDFViewCtrl has method called getSelection ( ) that can be used to obtain the current selection in the viewer.

Similarly there are methods that can be used to set the selection/highlights (**[selectByHighlights](, [selectByRect](, double, double, double)), [selectByStruct](, double, double, double)), [clearSelection](, etc**),

You may also want to take a look at ‘**pdftron.PDF.Highlights**’ which also includes utility methods to save and load highlights to/from a file or sting:

In case you are dealing with standard PDF annotations (’ pdftron.PDF.Annots.Highlight’) you can traverse what annotations are present in the document (as shown in Annotation sample - then serialize the info (e.g. rect, color) in your XML packet and send it to the server or directly to another device. There you would parse the info and use PDFNet annotation API to add the a new Highlight annotation at a given location.