Highlight Form Fields in RadPdfViewer
Product Version | Product | Author |
---|---|---|
2019.1.117 | RadPdfViewer for WinForms | Dimitar |
Description
This article demonstrates how you can use the custom painting functionality in order to highlight the editable fields in PDF document.
Solution
1. Subscribe to the DocumentLoaded event. This event will allow you to access the pages of the document ans subscribe to their ElementPainted event.
2. Use the ElementPainted event to paint the border. You will need to consider the scroll and the zoom as well. Here is the code:
This example will paint a yellow border around each field.
Notes
- In a .NET Framework project, a reference to WindowsBase is required to be added:
- In a .NET Core (or newer version), it is necessary to edit the proj file and include WPF: