diff --git a/ViewModel/BrowserViewModel.swift b/ViewModel/BrowserViewModel.swift index a49424e1..9a3e78eb 100644 --- a/ViewModel/BrowserViewModel.swift +++ b/ViewModel/BrowserViewModel.swift @@ -159,6 +159,9 @@ final class BrowserViewModel: NSObject, ObservableObject, } } + + /// Get the webpage in a binary format + /// - Returns: PDF of the current page (if text type) or binary data of the content func pdfData() async -> Data? { if metaData?.isTextType == true { return try? await webView.pdf()