                     pdfView.scaleFactor = scaleFactor.portrait / 2
                 }
             } else if UIApplication.shared.statusBarOrientation.isLandscape {
-                // set scaleFactor to safe area for iPhone X and later
-                let multiplier = (pdfView.frame.width - pdfView.safeAreaInsets.left - pdfView.safeAreaInsets.right) / pdfView.frame.width
                 if pdfView.displayMode == .singlePageContinuous {
-                    pdfView.scaleFactor = scaleFactor.landscape * multiplier
+                    pdfView.scaleFactor = scaleFactor.landscape
                 } else if pdfView.displayMode == .twoUpContinuous {
-                    pdfView.scaleFactor = scaleFactor.landscape / 2 * multiplier
+                    pdfView.scaleFactor = scaleFactor.landscape / 2
                 }
             }
         }

        if pdfView.displayDirection == .vertical {
            let frame = view.frame
            let aspectRatio = frame.size.width / frame.size.height
            var scaleFactor = pdfView.scaleFactorForSizeToFit
            if pdfView.displayMode == .twoUpContinuous {
                scaleFactor *= 2
            }

    
    func setScaleFactorForUser() {
        var scaleFactor: ScaleFactor?
        // if user had opened this PDF before, the stored scaleFactor is already optimized for safeArea.
        if pdfView.displayDirection == .vertical {
            scaleFactor = scaleFactorVertical
        } else if pdfView.displayDirection == .horizontal {
