title: PDFKit Swift control zoom
body: <p>I want to control the zoom level of pdf file. By default when it launches it doesn't fits the screen. Even manually (pinch zoom) zoom-in and zoom-out doesn't make it fit the page. I have set the autoScales for true.</p>
  
  <p>Also tried playing with below variable but it didn't help</p>
  
  <pre><code>   open var scaleFactorForSizeToFit: CGFloat { get }
  </code></pre>
  
  <p>Below is my code for the same</p>
  
  <pre><code>    pdfView = PDFView(frame: view.bounds)
      pdfdocument = PDFDocument(url: filePathUrl!)
      pdfView.document = pdfdocument
      pdfView.displayMode = PDFDisplayMode.singlePageContinuous
      pdfView.autoScales = true
      view.addSubview(pdfView)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xH7yd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xH7yd.png" alt="Control"></a></p>
  
  <p>Some control were user can control zoom level.</p>
  
  <p>Can it be achieved using gesture recognizer?</p>
  
  <p>Any Hint in right direction would be highly appreciated</p>