On this page
Guides
Get the Selected Content
Users can drag the mouse or use their fingers to select text and images in the PDF document, obtaining the selected content in real-time.
This example shows how to Get the selected content:
C#
// Extract the selected text.
TextSelectInfo textSelectInfo = viewerTool.GetTextSelectInfo();
textSelectInfo.PageSelectText.TryGetValue(pageIndex, out string text);
// Extract the selected image.
string tempPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".jpg");
myCPDFPage.GetImgSelection().GetImgBitmap(imageIndex, tempPath);