Copy link to clipboard
Copied
Hello,
I created a plugin to add a custom menu which will get the selected text and then I can do the operation on that text.
AVDoc avDoc = AVAppGetActiveDoc(); | |
// if a PDF is open, get its number of pages | |
PDDoc pdDoc = AVDocGetPDDoc(avDoc); | |
// Get the selected text as a text select |
PDTextSelect pdtext =static_cast<PDTextSelect>(AVDocGetSelection(avDoc)); |
Now, I want to get the actual text content with this object. How can I achieve that?
Thanks
Best Regards,
Navnath
Copy link to clipboard
Copied
1. Verify the selection type is Text or your code will surely crash Acrobat (when it isn't)
2. PDTextSelectEnumText.
Copy link to clipboard
Copied
And bear in mind, per the documentation, that the text passed to the callback may not be in reading order.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now