I’m at present utilizing PDFKit
to render a PDF Doc.
Beforehand, I used to be utilizing the QLPreviewController
to show the pdf file and seen that it offered a pleasant blue background to fields that the consumer might enter information into when tapping the shape enter button:
If I open the identical PDF kind in Adobe Acrobat Reader, it does an excellent higher job of this because it highlights the textual content fields but additionally issues like drop downs and checkboxes which QLPreviewController
would not do.
My query is, how can I do one thing comparable utilizing PDF Equipment ?
What I’ve tried
-
I loop by way of all of the annotations in a PDF file
-
I then attempt to verify if the sector is editable
if !annotation.isReadOnly || annotation.isActivatableTextField {
annotation.backgroundColor = .blue
}
This does add a background to some fields however:
- It would not cowl the identical fields because the
QLPreviewController
as some enter fields aren’t highlighted when utilizing the looping by way of annotation methodology - It would not cowl the checkboxes and different inputs coated by Adobe Acrobat Reader
Is there a technique to get comparable outcomes to Adobe Acrobat or atleast QLPreviewController