简体   繁体   中英

How to Save/Show PDF Highlight Annotations in Swift

I am successfully highlighting text in my PDF view using the answer in this question .

However, whenever I close and reopen the PDF file, the highlight annotations are nowhere to be seen (invisible).

How do I save and/or display the highlights?

Thanks in advance for helping a noob!

Check out the write operations on PDFKit: func write(toFile path: String) -> Bool

If you're using PSPDFKit, saving happens automatically based on certain trigger criteria (like moving an app into the background) but you can manually trigger it via calling public func save(options: [SaveOption] = []) throws on PSPDFDocument .

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