Alua-Kinzhebayeva / iOS-PDF-Reader

PDF Reader for iOS written in Swift
MIT License
532 stars 150 forks source link

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

Open jackdem opened 6 years ago

jackdem commented 6 years ago

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) } }

workingDog commented 6 years ago

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