I am currently using PDFKit to render a PDF Document.
Previously, I was using the QLPreviewController to display the pdf file and noticed that it presented a nice blue background to fields that the user could input data into when tapping the form input button:
If I open the same PDF form in Adobe Acrobat Reader, it does an even better job of this as it highlights the text fields but also things like drop downs and checkboxes which QLPreviewController doesn't do.
My question is, how can I do something similar using PDF Kit ?
What I've tried
I loop through all the annotations in a PDF file
I then try to check if the field is editable
if !annotation.isReadOnly || annotation.isActivatableTextField {
annotation.backgroundColor = .blue
}
This does add a background to some fields but:
- It doesn't cover the same fields as the
QLPreviewControlleras some input fields aren't highlighted when using the looping through annotation method - It doesn't cover the checkboxes and other inputs covered by Adobe Acrobat Reader
Is there a way to get similar results to Adobe Acrobat or atleast QLPreviewController

