                 return filePath
             
             case .printDate:
+                self.dateFormatter.dateFormat = UserDefaults.standard[.headerFooterDateFormat]
                 return String(format: "Printed on %@".localized, self.dateFormatter.string(from: Date()))
             
             case .pageNumber:

    // MARK: Lifecycle
    
    init() {
        
        // prepare date formatter
        self.dateFormatter = DateFormatter()
        self.dateFormatter.dateFormat = UserDefaults.standard[.headerFooterDateFormat]
        
        self.tabWidth = UserDefaults.standard[.tabWidth]
        self.lineHeight = UserDefaults.standard[.lineHeight]

    private let lineHeight: CGFloat
    private var printsLineNumber = false
    private var xOffset: CGFloat = 0
    private var lastPaperContentSize: NSSize = .zero
    private lazy var dateFormatter: DateFormatter = .init()
    
    private var asyncHighlightObserver: AnyCancellable?
    
