A Macintosh or iOS object that encapsulates the functionality of PDFKit and which can be dropped into an interface using Xcode's Interface Builder.
Questions tagged [pdfview]
179 questions
5
votes
2 answers
PDFKit - PDFThumbnailView skips a page instead of showing continuous pages - swift
I am able to present the PDFThumnailView of my pdf document. The problem is it is skipping pages. It shows pages 1,3,5 etc...and not displaying the pages in between. My code is below.
@IBOutlet weak var pdfView: PDFView!
@IBOutlet weak var…

johnDoe
- 709
- 11
- 29
4
votes
1 answer
How to use PDFView and PDFThumbnailView in iOS?
I found a PDFView and PDFThumbnailView in Object Library like this pic:
But my question is how to use it ??? I can't drag it in xib , and no idea to create a PDFView by code .
Any answer or tutorial will be help.

Webber Lai
- 2,014
- 5
- 35
- 66
4
votes
0 answers
PDFView with PKCanvasView drawingGestureRecognizer on iOS14
Minimum code to add a PKCanvasView to PDFView. The PKCanvasView displays properly if the PKDrawing is set. However on iOS14, the drawingGestureRecognizer does not fire. Works on iOS13
import UIKit
import PDFKit
import PencilKit
class…

NewEndian
- 559
- 2
- 16
4
votes
2 answers
How to remove PDFDocument margin
I add pdfdocument to the PDFView . but it is showing margin and also showing in the canter. How to remove this margin . And Is there any way to set pdfdocument to the top-left position.

Spanix Dev
- 101
- 6
4
votes
0 answers
Swift PDFView and URLs that end in "/pdf" instead of ".pdf"
I have code that loads a pdf file into the PDFView that Apple provides in Swift. It works great, but the problem comes when trying to view pdf files where the URL is not formatted correctly.
For example, if I provide a URL for the PDFView that looks…

MattChris
- 397
- 4
- 19
4
votes
1 answer
How do I customise the contextual menu of a PDFView?
I am using a PDFView instance in my application. I would like to both add my own items to the contextual menu, and remove some default ones that are not suitable within my app.
Some default items are suitable, so ideally I would be adapting the…

Giles
- 1,428
- 11
- 21
4
votes
1 answer
How to fit a PDF from UIImage in PDFView in swift?
I have an app that captures an image and converts it to pdf. It is then displayed in a PDFView. However, the PDF does not fit into the dimensions of my PDFView. How do I scale the pdf to fit the PDFView?
When the image is selected from…

johnDoe
- 709
- 11
- 29
4
votes
1 answer
PDFView setNeedsDisplay:YES doesn't work on MacOS Sierra 10.12
I have use [PDFView setNeedsDisplay:YES] to let the PDF view redraw, and it worked great on OSX 10.9-10.11.
However it doesn't work unless I zoom in or zoom out the PDF page...
Is there any other way to redraw immediately? Code below:
NSRect …

SuperBerry
- 1,193
- 1
- 12
- 28
4
votes
2 answers
Cocoa osx PDFView NSPrintOperation PrintPanel not showing page preview
In my app for Mac I have a webview that shows some html content. I create a PDFDocument from that webview and then I want to print that document. So I create a PDFView from the document and then I call the NSPrintOperation printOperationWithView.…

user3065901
- 4,678
- 11
- 30
- 52
4
votes
2 answers
Disable scroll for PDFView inside NSCollectionView
I have a PdfView inside a CollectionView. Since both have its own scrollviews I have conflicts in scrolling. So i want to disable scrolling for PdfView. How can I do it?

prabhu
- 1,158
- 1
- 12
- 27
3
votes
1 answer
Restrict to move/drag the pdf annotation within PDF Page boundary
I am loading one PDF on PDF view using the PDF kit library. I added one custome view (same like PDF Annotation) on pdf view, and I am allowing users to move/drag that custom view on pdf view(within pdf view/container view) using…

Nikita Patil
- 674
- 1
- 7
- 17
3
votes
2 answers
How to access com.sun.pdfview from maven?
I am trying to compile iText 2.7.1 code in a maven project. This code has a dependency to com.sun.pdfview. I know about the guide to coping with Sun jars, but it is not in the list.
Anyone has a solution? Where can I find it?

Jérôme Verstrynge
- 57,710
- 92
- 283
- 453
3
votes
0 answers
How to Save PDF (and print) from UITableView (or cell) easy way?
I read and search a lot on internet and stack, but I have a problem
I've used this extension
extension UITableView {
// Export pdf from UITableView and save pdf in drectory and return pdf file path
func exportAsPdfFromTable() -> String {
…

luke
- 31
- 1
- 3
3
votes
1 answer
PDFview scrollview zoom
I am working in pdf editing project, in that I have to add signature in pdfview and after that need to resize and delete that signature. Now for this I am adding one scrollview with UIView on top of pdfview with transparent alpha and add image view…

riddhi
- 316
- 2
- 16
3
votes
3 answers
How to restore the last page was loaded in a PDF View?
I'm a beginner developer, and it’s my first question post ever.
My app presents a PDF e-book, I used this library:
com.github.barteksc:android-pdf-viewer:2.8.2
When I reopen my app, pdfView loads the first page “pageNumber=0”, I want it to load…

TA.Fayrouz
- 61
- 9