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
0
votes
0 answers

PDFKit form ignore last user interaction when fill form unless user tap on the done botton

I have an iOS app that allows users to open a PDF form and fill it in. I got a problem when the user edits a text field and then clicks on save without tapping on the "done" button on the keyboard. When saving the PDF the last user entered text…
Charlie Wu
  • 7,657
  • 5
  • 33
  • 40
0
votes
1 answer

How to create a PDF page with Transparent background?

Here's the sample code used to create PDF data and then save it to the documents directory: Here the "self" is nothing but UIView self.isOpaque = false self.backgroundColor = UIColor.clear let pdfPageFrame = self.bounds let pdfData =…
Raj Kiran
  • 152
  • 1
  • 9
0
votes
0 answers

How to correctly copy text from a pdf file using PdfKit and Swift

Is there any way to achieve correct copying of text from pdf so that the line order is correct as on the original page. I am trying to copy text from a pdf file using PdfKit. But the text is copied sometimes (rarely enough) but with errors. Can…
Roman
  • 1
  • 1
0
votes
0 answers

PDFKit Page Overlay not accepting user input

I'm trying to display a page overlay over a PDF using PDFKit's Page Overlay feature. My actual use case is to allow drawing input as per this WWDC tutorial, but for the sake of simplicity here, my example just displays a button as a test of user…
0
votes
0 answers

Drawing an upright stamp annotation on a rotated PDF page

I have a custom class for stamp annotation with an image. While adding the annotation to a rotated PDF page, the annotation also rotating. To prevent this rotation and to make an upright stamp I'm rotating the context. But the image is not drawing…
Yasheed Mohammed
  • 187
  • 1
  • 14
0
votes
1 answer

PDFPage size/bounds won't change with setBounds unless setting a smaller size

Code below perfectly changes bounds if setting a smaller size. But when setting a larger size it won't work. Isn't it possible to upscale a PDFPage size? what works: let page = PDFPage() let rectBefore = page.bounds(for: .cropBox) print("rectBefore…
x670
  • 75
  • 6
0
votes
0 answers

How to add tocuh gesture in PDFAnnotation

Anyone Work on PDFKit, I draw a custom Annotation in PDFView, But I want to add action in Custom Annotation and I can't able to add Gesture in PDFAnnotation because it does not inherit from UIView, so is there any way to add Gesture in…
0
votes
2 answers

Update and Pass published variable value to view after click of Button

Summary: I have a list loaded from an API. Each list item have a button. On click of button, a unique ID associated with the list item is sent to server which in response provides a pdf directly there is no other response just a pdf file, the api is…
0
votes
0 answers

Using PDFKit to Open PDF in App Automatically after Downloading

Missing some connection which I am unable to figure out (also googled a lot still no success) in how to open PDF file in app. I am using PDFKit. This is the PDFKitView struct in which URL should be passed: struct PDFKitView: View { @State…
tintin
  • 335
  • 2
  • 8
0
votes
1 answer

Unable to save pdf after signature

I am able to sign a pdf, But when I tried to saved it, Its not saving the updated pdf file. Code override func viewDidAppear(_ animated: Bool) { pdfContainerView.usePageViewController(true, withViewOptions: nil) guard let signatureImage…
iDeveloper
  • 2,339
  • 2
  • 24
  • 38
0
votes
1 answer

PDFView - fit height+width of 2 pages & enable scroll to the next page

I have a view, which contains PDFView from PDFKit. I want to see 2 full pages at once on my screen and they need to fit both height and width. I can see 2 ways of doing it, but neither is perfect: Option 1) Display mode with .twoUpContinuous - here…
Nat
  • 12,032
  • 9
  • 56
  • 103
0
votes
0 answers

Setting PDF start point with swift PDFkit

I want to change the starting position of the first page of the table I created for the first page created let pageRect = CGRect(x: 0, y: 150, width: pageWidth, height: pageHeight) for other created pages let pageRect = CGRect(x: 0, y: 0, width:…
MFEkmen
  • 1
  • 3
0
votes
1 answer

How to annotate rounded, aspect-fill image in PDFView (swift PDFKit)

I am working on annotate an image to an existing PDFView. This is my current state: And below is my desired state: In one sentence, I want to achieve: a rounded corder of my image annotation image should also maintain the original aspect ratio I…
Jack Stark
  • 57
  • 7
0
votes
1 answer

Images are overwritten when modifying a PDF iOS

I have an application that allows a user to draw on a PDF. The user's drawing is saved as an image which is then added to an existing PDF. The issue I encounter is when a user has already drawn 2 images. For some reason, saving the 3rd image cause…
Scout 43
  • 49
  • 1
  • 7
0
votes
0 answers

App freezes when highlighting large pdf document using apple PDFKit

Using the below code to highlight search text string in a pdf. let selections = pdfView?.document?.findString(searchTerms!, withOptions: [.caseInsensitive]) selections?.forEach { selection in selection.pages.forEach {…
iosdev
  • 5
  • 2
1 2 3
8 9