iOS-PDF-Reader icon indicating copy to clipboard operation
iOS-PDF-Reader copied to clipboard

Bug when PDF is landscape orientation and app is locked portrait?

Open jackdem opened this issue 7 years ago • 1 comments

I have a bug where my portrait orientated app, loads blank pages for landscape PDF's

Here is a screenshot

simulator screen shot - iphone 8 - 2018-02-02 at 10 14 27

This is landscape, it will load if i click the share button and save the PDF, but currently its just blank. If i send the PDF as portrait, it will load fine, so this is a landscape related issue

Is this a library bug? surely it should be able to show a pdf in landscape without issue?

Appreciate help with a resolution, i create my PDF like so:

let docString = document.replacingOccurrences(of: "data:application/pdf;base64,", with: "") if let documentURL = self.saveBase64StringToPDF(base64String: docString, title: documentTitle) { if let document = PDFDocument(url: documentURL) { let myBackButton = UIBarButtonItem(title: NSLocalizedString("Close", comment: ""), style: .done, target: self, action: #selector(self.closeView)) let readerController = PDFViewController.createNew(with: document, actionStyle: .activitySheet, backButton: myBackButton) self.navigationController?.pushViewController(readerController, animated: true) } }

jackdem avatar Feb 02 '18 10:02 jackdem

I have a similar issue. Did you find a workaround?

workingDog avatar Apr 05 '18 08:04 workingDog