Tuesday, March 12, 2024
HomeiOS Developmentios - Understanding which fields permit enter utilizing PDFKit just like QLPreviewController

ios – Understanding which fields permit enter utilizing PDFKit just like QLPreviewController


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:

QLPreviewController form input

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.

Adobe Acrobat Reader form input

My query is, how can I do one thing comparable utilizing PDF Equipment ?

What I’ve tried

  1. I loop by way of all of the annotations in a PDF file

  2. 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:

  1. 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
  2. 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



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments