I'm trying to save and load a PDF document using Swift's PDFDocument.write method, but encountered an issue where the textual content of the saved document was consistently corrupted compared to the original. For instance, "*" gets changed to "ú"…
I'm building an identity app which is stored all locally within the app on device.
Part of the app is the creation of IdentityCard for each user - with the standard things, name, image, position.
The size of the card is a standard credit card size:…
I'm working on an app that displays a PDF using PDFKit, and I need to be able to set the minimum zoom level - otherwise the user can just zoom out forever. I've tried to set minScaleFactor and maxScaleFactor, and because these turn off autoScales, I…
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 =…
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…
I'm working with PDFKit and similar to the Apple Preview App, when adding PDF annotations, I'd like the user to be able to move them around on the page. I've created an example project on Github.
I've tried subclassing PDFView and overriding func…
I wrote a small PDF merging application in Swift for MacOS, using Apple's basic PDF framework. The basic strategy is to take a list of PDF files, and then iterate over the pages of the 2nd to nth file, appending each of them to the end of the first…
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)
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 }
…
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…
I try to get notifications as soon as the currently visible pages in my pdfView change.
Actually this should work according to the documentation via .PDFViewVisiblePagesChanged.
However, I only get a notification the very first time when the pdfView…
I have a PDFView in an app. It allows you to highlight certain text. When you click on a highlight, the built in menu appears:
In the Preview.app, when you click one of those colors (or the remove highlight) menu item, it does what you expect…
I'm trying to draw multiple images into a single PDFPage.
Looking at the docs and over StackOverflow seems like the best I got is to use PDFPage with an UIImage initializer like so:
let pdfPage = PDFPage(image: image)
But it just creates a page…
while we make a pdf using an image file at that we add an image into PDFPage. at that time PDFDocument did not show the original image content in PDFView in iOS 16. I checked the same code which worked properly in iOS 15. For both test cases, I used…
I have a class to edit pdf by inserting an image into the pdf and save a new pdf with the inserted image.
Below code is the way I use to achieve the scenario, by creating a custom PDFAnnotation. I specify type as .widget instead of .stamp to avoid…