     var collectionView: PDFSinglePageViewer!
     
     var pageScrubber: PDFPageScrubber!
+    
+    var shareFormBarButtonItem: UIBarButtonItem?
     
     public var scrollDirection: UICollectionViewScrollDirection = .horizontal
     

        if UIDevice.current.userInterfaceIdiom == .pad {
            activityVC.modalPresentationStyle = .popover
            let popController = activityVC.popoverPresentationController
            popController?.sourceView = self.view
            popController?.sourceRect = CGRect(x: self.view.frame.width - 34, y: 64, width: 0, height: 0)
            popController?.permittedArrowDirections = .up
        }
        present(activityVC, animated: true, completion: nil)

        var buttons: [UIBarButtonItem] = []
        
        if allowsSharing {
            let shareFormBarButtonItem = UIBarButtonItem(
                barButtonSystemItem: .action,
                target: self,
                action: #selector(PDFViewController.shareForm)
            )
            buttons.append(shareFormBarButtonItem)
            self.shareFormBarButtonItem = shareFormBarButtonItem
        }
        
        if allowsFormFilling {
