简体   繁体   中英

Rendering PDF in iOS

Need help on rendering PDF using CGPDFContext . I am currently using UIWebView to display PDF but would like to perform much more operation rather than just reading like Highlight Text, Search PDF, Annotate PDF. Not looking for using any Framework or library. Any help will be beneficial. For a start, code on how to render PDF using CGPDF and displaying it instead of using UIWebView .

PDF annotations are a rabbit hole. I've been working on them since 2010. The spec is thousands of pages. It's easy to get started but it takes forever to get right with all the PDFs and variations out there. Even a simple feature like bookmarks are harder than you would think.

To date there's no open source framework that implements PDF annotations. The above linked one can be a good starting point. If you don't have months/years to build something on your own, there are a few commercial options available - like PSPDFKit , available for iOS, Android and Web, which I am building.

We have a guide article listing the most important PDF spec documents . Searching is another tricky topic. It's quite hard to convert the PDF text data to unicode. The Adobe CIDFont spec is a good starting point.

You shoud try VFReader , it is an open source project for rendering PDF files on iOS. It can be a good starting point.

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