     }
     
     override func viewDidLoad() {
+        let doubleTapGesture = UITapGestureRecognizer(target: self, action: #selector(doubleTapGestureRecognizerHandler(_:)))
+        doubleTapGesture.numberOfTapsRequired = 2
+        pdfView.addGestureRecognizer(doubleTapGesture)
+        navigationController?.barHideOnTapGestureRecognizer.require(toFail: doubleTapGesture)
         navigationController?.barHideOnTapGestureRecognizer.addTarget(self, action: #selector(barHideOnTapGestureRecognizerHandler))
         
         

        return navigationController?.isToolbarHidden == true
    }
    
    @objc func barHideOnTapGestureRecognizerHandler() {
        navigationController?.setToolbarHidden(navigationController?.isNavigationBarHidden == true, animated: true)
        setNeedsUpdateOfHomeIndicatorAutoHidden()

    var scaleFactorForSizeToFit: ScaleFactor?
    var scaleFactorVertical: ScaleFactor?
    var scaleFactorHorizontal: ScaleFactor?
    var zoomedIn = false
    
    // offset
    var offsetPortrait: CGPoint?
