Highlight search text with C #
Hello,
I'm trying to develop an application in .NET C # that will use Adobe Acrobat SDK DC. This application should look for specific text page by page of a PDF, ignoring breaklines, columns and even the separation of words by the "-" character, when found to color the background of the text as does the hightlight tool.
I found this example in the own SDK documentation, however the same was done for developers in C ++.
Example:
[
// Create the object HiliteEntry And Set its attributes
HiliteEntry hilite;
hilite.offset = 10;
hilite.length = 1;
// Get the page number of the current page view
AVDoc currentAVDoc AVAppGetActiveDoc = ();
PDDoc currentPDDoc = AVDocGetPDDoc (currentAVDoc);
AVPageView currentPageView = AVDocGetPageView (currentAVDoc);
ASInt32 pagenum = AVPageViewGetPageNum (currentPageView);
// Highlight the tenth word
PDPage pdPage = PDDocAcquirePage (currentPDDoc, pagenum);
PDTextSelect textSelection = PDTextSelectCreateWordHilite (pdPage,
& Hilite, 1);
AVDocSetSelection (currentAVDoc, ASAtomFromString ( "Text"),
(Void *) textSelection, true);
AVDocShowSelection (currentAVDoc);
PDPageRelease (pdPage);
]
What should I import references in C # and would like the code to implement this feature?
