On this page
Highlight Form Fields and Hyperlinks
You can use CPDFConfiguration
or CPDFReaderWidgetController
to set the form and hyperlink annotations in the current document to be highlighted.
The highlight feature for PDF form fields helps users quickly locate and fill out forms, significantly enhancing efficiency in scenarios involving extensive form completion.
The highlight feature for hyperlinks allows users to add hyperlinks to crucial information within a PDF document, facilitating other users in swiftly locating and comprehending information. This not only improves the readability of the PDF document but also enhances its interactivity.
This example shows how to highlight form fields and hyperlinks:
dart
/// CPDFConfiguration
CPDFReaderWidget(
document: widget.documentPath,
configuration: CPDFConfiguration(
readerViewConfig: CPDFReaderViewConfig(linkHighlight: true,formFieldHighlight: true)),
onCreated: (controller) {
},
)
/// CPDFReaderWidgetController
/// Enable hyperlink highlighting.
await controller.setLinkHighlight(true);
/// Enable form field highlighting.
await controller.setFormFieldHighlight(true);