I took pdfView, and I am trying to load pdf document on this pdfView. Pdf is not displaying/showing full screen w.r.t its pdfView as I added in storyboard. It has some gaps from top and bottom. (see the gray colour in pdf) Here is the screenshot,
Here is the code I wrote for this,
func loadPdf(documentsURL:String){
if let pdfDocument = self.createPdfDocument(forFileName: documentsURL) {
self.pdfView.document = pdfDocument
pdfView.autoresizesSubviews = true
pdfView.autoresizingMask = [.flexibleWidth, .flexibleHeight, .flexibleTopMargin, .flexibleLeftMargin]
pdfView.displayDirection = .vertical
pdfView.autoScales = true
pdfView.displayMode = .singlePage//.singlePageContinuous
pdfView.displaysPageBreaks = true
pdfView.maxScaleFactor = 4.0
pdfView.minScaleFactor = pdfView.scaleFactorForSizeToFit
pdfView.usePageViewController(true, withViewOptions: [:])
self.pdfView.backgroundColor = UIColor.gray
}
}
How I can remove that extra space from top and bottom and make/show/display that pdf document to full to screen w.r.t pdfView which I added in storyboard that same size.
Any solution for this?