Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Highlight search text with C #

New Here ,
Jun 21, 2016 Jun 21, 2016

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?

TOPICS
Acrobat SDK and JavaScript
665
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2016 Jun 21, 2016

This is a sample for a plugin. Plugins can only be created with C/C++.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2016 Jun 21, 2016

Thanks in advance for your time.

I do not have much knowledge in C / C ++ is that I can implement something in C # that consume these methods plugin?

If I will not summarize here what I need.

An application that reads a PDF that already exists and check all the places where to find a specific text.

Can you help me?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 21, 2016 Jun 21, 2016
LATEST

No, if you don't have the time/skills to lean C/C++ we cannot help you use the plugin API. That is the only way. The plugin API is much more powerful than the others.

JavaScript getPGeNthWord is your starting point. But use the documentation, don't just trawl for samples.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines