Foxit PDF SDK for iOS

How to highlight form fields and set form field highlight color?

The interface is provided to set whether to enable highlighting the form fields in PDF form files. By default, the form fields will be highlighted. If you do not want to highlight form fields, you should change the source code of the UI Extensions Component, please refer to PDF SDK for iOS Developer Guide to add the “uiextensions” project found in the “libs/uiextensions_src” folder to your project. Then, find the onDocOpened function in “UIExtensions/Form/FormAnnotHandler.m“, and set the parameter of FSFormFiller::highlightFormFields to “false” as follows:

- (void)onDocOpened: (FSPDFDoc* )document error: (int)error
{
...
...

[_formFiller highlightFormFields:false];
}

The FSFormFiller::setHighlightColor interface is used to set the highlight color. Please make sure you have not disabled highlighting form fields. Following is a sample for calling this API:

- (void)onDocOpened: (FSPDFDoc* )document error: (int)error
{
...
...

[_formFiller highlightFormFields:ture];
[_formFiller setHighlightColor:0x4b00ff00];
}

 

Updated on August 29, 2018

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: