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
3
votes
1 answer
PDFKit: How to move current page in PDFView to a specific offset
Assuming there is only one page in the PDF.
What I am trying to achieve: Save Zoom and offset of a PDFPage currently being viewed and show the page at exact same offset and zoom level when user comes back to that page.
What I have achieved:…

Muhammad Irfan
- 280
- 3
- 17
3
votes
2 answers
Is there a specific way to listen to the completion of PDFDocument or PDFView url load?
I have implemented a Custom PDFView that loads pdf files from the cloud and locally if available. For local instances as expected everything loads fast, but when the url is not local i.e from the server it may take a while, I'd like to add an…

Jojo Narte
- 2,767
- 2
- 30
- 52
3
votes
2 answers
How to create a single page vertical scrolling PDFView in Swift
I am trying to make a vertical scrolling PDFView using the following code:
pdfView = PDFView(frame: view.frame)
pdfView.backgroundColor = UIColor.white
var documentName: String = "test"
if let documentURL = Bundle.main.url(forResource:…

Jeremie
- 2,241
- 2
- 17
- 25
3
votes
2 answers
Starting a specific app in Android
I know how to load a PDF file in Android. But if more than one PDF viewers are installed, Android shows a list to choose from. I want to load my PDF file with a specific PDF viewer (say DroidReader). How to do this?

Mudassir
- 13,031
- 8
- 59
- 87
3
votes
2 answers
PDFView printWithInfo:autoRotate: fails
I'm trying to print a PDFDocument that I am constructing from a series of images. In case it matters, I'm doing all of this from within a Mozilla plugin.
I create the PDFDocument, and put it into a PDFView, then I call
[printView printWithInfo:…

Brian Postow
- 11,709
- 17
- 81
- 125
2
votes
0 answers
Swift PDFKit how to scroll to specific point programmatically
I have vertical scrolling pdfView:
var pdfView = PDFView()
pdfView.displayDirection = .vertical
pdfView.usePageViewController(false)
pdfView.pageBreakMargins = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
…

cyj89317
- 45
- 4
2
votes
1 answer
Advance PDF Viewer : Failed assertion: line 4263 pos 14: 'owner!._debugCurrentBuildTarget == this': is not true
I am getting the error when I try to load the pdf from URL.
It shows the number of pages of pdf but then error appears on the screen.
Using plugin - https://pub.dev/packages/advance_pdf_viewer
Logcat:
======== Exception caught by widgets library…

Sachin Solanki
- 79
- 2
- 15
2
votes
1 answer
Why is my PDFView in fragment not showing properly in my viewpager2? I can't seem to show the pdfview properly
I want to show one page of pdf file from one fragment using viewpager2. So every page scroll, I will be loading a PDFView from filepath. So if i have 6 pdf files, i will store the pdf files in an array and combine them all in one pdfview by using…

Syazlina Aasim
- 21
- 2
2
votes
3 answers
PDF to HTML or similar
I'm building an application to view pdf's through a browser without the need of a plugin on mobile devices. I tried ImageMagick and ghostscript to covert the pages to images but they are far too large and text becomes unclear. I see website offering…

Tw1tCh
- 89
- 1
- 12
2
votes
0 answers
Is there a way to invert the colors in a PDFView?
I'm displaying PDF files in an iOS / Mac Catalyst app with PDFView. My app has had a dark color theme since long before Apple added Dark Mode to its operating systems, but now that Apple supports this, I'm thinking it should be possible to display…

arlomedia
- 8,534
- 5
- 60
- 108
2
votes
0 answers
iOS 13.2.3 pdfViewGestureRecognize and PDFkit
Here is my Code it work perfectly in iOS 12 but for iOS 13 code can't give exactly values
let pdfViewGestureRecognizer = PDFViewGestureRecognizer()
pdfView.autoScales = true
pdfView.displayMode = .singlePage
…

MidDev
- 182
- 1
- 15
2
votes
1 answer
Get Page Size From PDFDocument iOS
I'm having issues getting the size of a page in a PDFDocument. The following code gets the size (width and height), but the results are inconsistent. It can even be inconsistent from page to page within the same PDFDocument being tested. One…

user2621075
- 357
- 4
- 15
2
votes
3 answers
How to disable look up, share, forward menu items in pdfkits pdfview in ios13
Since the ios13 update, overriding the PDFView class’s method
canPerformAction(_ action: Selector, withSender sender: Any?)
no longer detects or controls the "look up", "share" and "forward" menu items and I can't figure out a way to disable them.…

shochu_king
- 136
- 2
- 10
2
votes
1 answer
Load PDF from URL with Authentication
I want to display a .pdf file in WebView which is having authentication. The app has been rejected by Google as I am using intent to load the WebView
Intent intent = new…

Bibin Johnson
- 59
- 9
2
votes
1 answer
Crash with PDFKit on iOS 12.2
In iOS 12.2, passing true to PDFView's usePageViewController(_, withViewOptions:) will cause a crash with the following exception:
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan…

Rudedog
- 4,323
- 1
- 23
- 34