简体   繁体   中英

How to override WebKit's PDFViewSavePDFToDownloadFolder?

I have an application that includes a WebView, which automatically displays PDFs in WebKits WebPDFView. When the user hovers above the lower portion of the document, an overlay appears that enables zooming, opening in Finder and saving the PDF in the download folder.

I would like to implement the latter, but I have no idea how to go about it, except that I need to implement PDFViewSavePDFToDownloadFolder. However, where do I implement it? I'd appreciate any pointers.

If you want to monkey patch Apple's built-in PDF viewer, you can't unless you want to use a code injection hack that is guaranteed to break. If you want to implement your own PDF viewer, then you build a WebKit plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM