Questions tagged [ios-pdfkit]

This tag should only be used for questions related to PDFKit which is available for iOS as of iOS 11.0 and macOS as of 10.4.

PDFKit is a framework for iOS and macOS. Display and manipulate PDF documents in your applications.

131 questions
2
votes
1 answer

Swift PDFKit - PDFAnnotation button not displaying text

I am trying to build a table of contents in a PDF in swift. My button is not displaying any text, though the bounds and background color is displaying. let anno: PDFAnnotation = PDFAnnotation(bounds: CGRect(x: xPosition, y: yPosition, width: 300,…
C. Skjerdal
  • 2,750
  • 3
  • 25
  • 50
2
votes
0 answers

iOS PDFKit - setting permissions of the document - is it possible

Apple's PDFKit allows getting Permission Properties of the PDFDocument. But is there a way to set these permissions as well? I would like to be able to limit the permissions to "view and print" only. Thanks Libor
matyasl
  • 295
  • 2
  • 11
2
votes
0 answers

Diacritic insensitive search in PDFDocument

Using PDFKit, I'd like to perform diacritic insensitive search in a PDFDocument. I tried to add the diacriticInsensitive compare options in my call beginFindString(_:withOptions:), but it seems to be ignored. document.beginFindString(text,…
ocadosales
  • 21
  • 2
2
votes
0 answers

How to rotate PDFAnnotation using PDFKit (Swift)?

I am working on PDF Kit using swift. I want to rotate PDFAnnotation. Is there any way to rotate PDFAnnotation? I am trying with the below code but I am not successful to get the desired result. annotation.bounds.origin =…
Sac Allen
  • 61
  • 3
2
votes
0 answers

Inserting Blank page after adding image on previous page in pdf using PDFKit Swift

I am facing the problem while inserting a blank page in pdf using PDFKit. when there are images on pdf importing from gallery or capturing from the camera. and then we add a blank page on that pdf at that time the page is very small. it's not in A4…
2
votes
0 answers

Saved PDFView with PDFKit IOS not showed properly in Adobe reader

I am creating an app where I open a PDF with form elements, add some data and export it again to a new PDF file. The code to export this file looks like this: @IBAction func exportPDF(_ sender: Any) { guard let url =…
Sven Cozijn
  • 119
  • 14
2
votes
0 answers

PDFPage setBounds is blurry and deform

The page I get from page.setBounds is blurry and deform. but the actual page (even after zooming) is very clear.I want to maintain pdf quality after setBounds. myPage.setBounds(box.bounds, for: .cropBox)
Spanix Dev
  • 101
  • 6
2
votes
1 answer

PDFViewer SWIFT 4 Xcode 10.3

Here's my code. I have a file "dreamGirls.pdf" import UIKit import PDFKit var pdfView : PDFView! func createPDFViewer() { let path = Bundle.main.path(forResource: "dreamGirls", ofType: "pdf") let url = URL(fileURLWithPath:…
Mason Ballowe
  • 1,847
  • 2
  • 12
  • 23
2
votes
1 answer

IOS PDFKIT memory leak on zoom

I have a PDF view created using PDFKIT which loads a PDF in iPad. When we zoom the PDF and make some freehand drawing it crashes. What could the problem be ??
2
votes
0 answers

Not getting selection from PDFView

I see somewhere this code for highlight selected text in pdf document: let select = pdfView.currentSelection?.selectionsByLine() //assuming for single-page pdf. guard let page = select?.first?.pages.first else { return } …
Spanix Dev
  • 101
  • 6
2
votes
0 answers

Adding Button/Label on Pdf Page using PDFKIT

I am trying to add some interactive buttons on pdf pages. I am showing Pdf file using Apple PDFKit and I have implemented UITapGesture, so when user tap on screen I show a annotation on it, issue is I want to mark this annotation as number like…
Najam
  • 1,129
  • 11
  • 32
2
votes
1 answer

Check pdf is Password protected or not before iOS 11.0

I'm getting a url which contains an pdf document. I need to ask the user for the password if it is protected. The same is able to do after iOS 11.0 using PDFkit. if #available(iOS 11.0, *) { if let pdfDocument =…
Saranjith
  • 11,242
  • 5
  • 69
  • 122
2
votes
2 answers

How do I disable to edit PDFAnnotations?

I'm builting iOS app in Swift 4.2 that can make signature to PDF file. But in case Embeding the signature as PDFAnnotation, it can editable in apple's Preview app or other app which can edit pdf. How can I disable to edit PDFAnnoations…
2
votes
1 answer

PDFAnnotation only appears when editing

I'm working with annotations in pdf file. The problem is that text filled in annotation's text field is only visible while editing. As soon as I stop editing this text field, text disappears. I'm filling annotations this way: for index in…
Alexandr Chekel
  • 382
  • 2
  • 15
2
votes
0 answers

ios PDFKit blurry pdf

I'm having trouble using PDFKit in my application. I have a table cell in which I'm trying to render a PDF using PDFKit. I'm able to load/render the PDF, but what's happening is the PDF is clear at the top but as you scroll down it becomes…
user1513171
  • 1,912
  • 6
  • 32
  • 54
1 2
3
8 9