Comparing iOS PDF libraries

http://www.binpress.com/blog/2014/07/28/comparing-ios-pdf-libraries/

Displaying PDFs on iOS devices is pretty straightforward, but things get trickier for more advanced usage, such as embedding media, adding annotations, performing text search with support for multiple languages and more.

In this post we compare the most popular libraries and SDKs for rendering PDFs on iOS, including our own PDFTouch SDK, and highlight what you should pay attention to when picking (or paying for) a PDF rendering library.

The roundup

PDFTouch SDK PSPDFKit Foxit Embedded PDF FastPdfKit PDF Reader Core Feature
Source Code YES NO NO NO YES
Includes Support YES YES YES YES NO
Per-app License YES Quote Required Quote Required YES MIT License
Unlimited App License YES Quote Required Quote Required YES MIT License
Text Search YES YES YES YES NO
Multimedia Overlays YES YES NO YES NO
Annotations YES YES YES YES NO
Maintained Actively Actively Actively Actively Sporadically
Price (for features listed) Starts at $749 Quote Required Quote Required Free w/Splash Screen, €2,990 without Free

Source-code included

One of the main things to consider when integrating a third-party library on iOS is whether the actual source is included or not. In many case, the library is provided in binary format with header files only. This is still useful for adding functionality in your app, but not as useful as having the complete source available.

With the full source code, you can see how things are implemented, fix bugs or make modifications if necessary. This can be critically important if a feature you need is missing, or something doesn’t work as intended with a specific configuration.

Out of the lineup above, only PDFTouch and PDF Reader Core make their source code available.

Text Search

Searching inside documents is a feature users have become accustomed to, and one they’d expect to have in your app. Every SDK on our list — except for PDF Reader Core — provides text search capabilities, which means you don’t need to deal with character encoding and multi-language support to include this feature.

Annotations

Adding annotations to PDF documents is also a common feature, especially for productivity apps. Adding annotations means that you need to be able to edit and save PDF documents – which goes far beyond simply rendering it. You’ll also have to decide what kind of markup you’ll allow: different kinds of pens and brushes, text, shapes or otherwise.

All the libraries but PDF Reader Core support annotations.

Media Overlays

Simple text PDFs are easy to render, but many documents and eBooks today contain different types of media as well. Overlaying videos, images, audio and other content makes for engaging and interactive books, brochures and more.

Foxit Embedded PDF and PDF Reader Core are the only two SDKs from our roundup that lack multimedia overlays.

Performance

Viewing a PDF isn’t usually a very intensive task, but we tested every SDK with a roughly 1,000-page behemoth to see how they’d perform. Each solution ran quickly when it came to flipping through the document, but we can’t say the same for text search. Foxit’s offering was significantly slower when finding search results, while its competition swiftly scoured the file.

Cost

Cost is always a factor when picking a library. It’s great when there’s a free and open-source solution that meets your needs, but if you can’t find one you’ll need to weigh the value of paid options, and whether they fit within your budget.

PDF Reader Core is free and open source, but doesn’t support most advanced features.

Of the other four libraries, PDFTouch SDK and FastPdfKit provide their pricing upfront, while PSPDFKit and Foxit Embedded PDF require a quote. Requesting one usually means enterprise pricing, which — in general — magically eats up all your available budget (with even the cheapest license being expensive).

Conclusion

As impartial as we tried to be, we probably wouldn’t have written this comparison if we didn’t believe we could make a good case for the product that uses Binpress, PDFTouch SDK for iOS. Still, we think it stands on its own merits.

If you need advanced PDF rendering features on iOS, see the value in having the complete source available and are cost conscious, PDFTouch SDK makes perfect sense. If you’d rather go with a brand name, because that’s how it goes sometimes in corporate decision making (Nobody ever got fired for picking IBM), you should pick PSPDFKit or FastPDFKit – both of which have a long list of amazing clients to showcase.

If you know of other worthy libraries, or have other requirements we didn’t cover – let us know in the comments!

猜你喜欢

转载自shappy1978.iteye.com/blog/2181663