         
         super.viewWillDraw()
         
-        self.loadPrintSettings()
+        self.applyPrintSettings()
     }
     
     

            }
        }()
        
        // setup syntax highlighting with theme
        let themeName = (settings[.theme] as? String) ?? ThemeName.blackAndWhite
        if themeName == ThemeName.blackAndWhite {
            layoutManager.removeTemporaryAttribute(.foregroundColor, forCharacterRange: textStorage.string.nsRange)
            self.textColor = .textColor
            self.backgroundColor = .white
            layoutManager.invisiblesColor = .gray
            
        } else {
            if let theme = ThemeManager.shared.setting(name: themeName) {
                self.theme = theme
                self.textColor = theme.text.color
                self.backgroundColor = theme.background.color
                layoutManager.invisiblesColor = theme.invisibles.color
            }
            
            // perform syntax highlighting
            if let controller = NSPrintOperation.current?.printPanel.accessoryControllers.first as? PrintPanelAccessoryController {
                _ = self.syntaxParser.highlightAll { [weak controller] in
                    DispatchQueue.main.async {
                        guard let controller = controller, !controller.view.isHidden else { return }
                        
                        controller.needsUpdatePreview = true
                    }
                }
            }
        }
    }

    // MARK: Private Methods
    
    /// parse current print settings in printInfo
    private func applyPrintSettings() {
        
        guard
            let settings = NSPrintOperation.current?.printInfo.dictionary() as? [NSPrintInfo.AttributeKey: Any],
            let layoutManager = self.layoutManager as? LayoutManager
            else { return }
        
        // check whether print line numbers
        self.printsLineNumber = {
            switch PrintLineNmuberMode(settings[.lineNumber] as? Int) {
            case .no:
                return false
            case .sameAsDocument:
