1

I am creating app where i need to load the pdf file from document directory and need to highlight text manually by user. Also we need to export the updated pdf file and upload it to the server. Is there any way to manage the same using pdfkit ? Please share the sample code if available.

We are using the library as a reference is listed below https://github.com/uxmstudio/UXMPDFKit This library is using the same concept as we need but exporting the pdf is the main task we need to achieve.enter image description here

In simple word we can say that user can highlight some text from the displayed pdf text and upload it to the server.

SULEMAN BAWA
  • 75
  • 10
  • 1
    You can use the below extension to highlight any text in a pdf document. `extension ViewController: PDFDocumentDelegate { func didMatchString(_ instance: PDFSelection) { guard let page = instance.pages.first else { return } instance.draw(for: page, active: true) let annotation = PDFAnnotation(bounds: instance.bounds(for: page), forType: .highlight, withProperties: nil) page.addAnnotation(annotation) } }` – Faheem Rahman Dec 12 '18 at 10:01

0 Answers0