 import UIKit
 import PDFKit
 
-class DocumentViewController: UIViewController {
+class DocumentViewController: UIViewController, UISearchBarDelegate {
     
     @IBOutlet weak var pdfView: PDFView!
     

            self.saveAndClose()
        }
    }
}

    }
    
    override func viewDidLoad() {
        navigationController?.hidesBarsOnTap = true
        
        let searchController = UISearchController(searchResultsController: nil)
        searchController.searchBar.delegate = self
        navigationItem.searchController = searchController
        navigationItem.hidesSearchBarWhenScrolling = false
        
        pdfView.autoScales = true
        pdfView.displaysPageBreaks = false
