Copy Document Content
- 2 minutes to read
The PDF Viewer allows you to select and copy text and an image from the document to clipboard.
To copy an image:
- select the image or any part of an image;
right click the image and select the Copy command in the context menu, or press Ctrl+C;
- paste the image into a desired application by choosing the Past command in the context menu, or pressing Ctrl+V.
To copy text:
- highlight the text you desire;
choose the Copy command in the context menu, or press Ctrl+C;
- paste the content into an application.
To select all text in a document for copying:
- invoke the context menu;
choose the Select All command (press Ctrl+A);
- call the PdfViewerControl.SelectAll method.
You can get information about whether document content is selected using the PdfViewerControl.HasSelection property. To obtain selected content in code, call the PdfViewerControl.GetSelectionContent method.
You can also clear the current selection by calling the PdfViewerControl.UnselectAll method.
To perform specific actions each time an end-user started, continued or ended the selection of document content, handle PdfViewerControl.SelectionStarted, PdfViewerControl.SelectionContinued, and PdfViewerControl.SelectionEnded events.