                 
                 self.pdfView.document = document
                 
-                self.moveToLastReadingProsess()
+                self.moveToLastViewedPage()
                 if self.pdfView.displayDirection == .vertical {
                     self.getScaleFactorForSizeToFit()
                 }

    var managedObjectContext: NSManagedObjectContext? = nil
    var pageIndex: Int64 = 0
    var currentEntity: DocumentEntity? = nil
    var currentCKRecords: [CKRecord]? = nil {
        didSet {
            checkForNewerRecords()
        }
    }
    
    // scaleFactorForSizeToFit
    var portraitScaleSingle: CGFloat = 0.0

                portraitScaleSingle = landscapeScaleSingle / aspectRatio
            }
        }
        
        setScaleFactorForSizeToFit()
    }
    
    func setScaleFactorForSizeToFit() {
