PDFNet is easy to use with a Swift project. This post will show how to set up a new Swift project and display a PDF.
The way tool library callbacks work has changed for better transparency and customization. Updating existing code to work with the new PDFViewCtrl should only take a couple of minutes and is described here.
This tutorial shows the minimum steps needed to add a PDF viewing and annotating component to a Xamarin.iOS app using PDFNet SDK. In this tutorial, you will create a simple PDF viewing and annotating app. You will also create an iOS Objective-C Bindings Library Project that allows you to customize our Tools library.
Note that the completed sample project described in Part 1 and Part 2 can be found in the samples folder located inside the PDFNet component package. The completed sample project described in Part 1-3 is available by request from here.
The tutorial is divided into 5 parts:
- Part 1: Run the sample project.
- Part 2: Create a new application with PDFNetiOS.dll and Tools.dll.
- Part 3: Create a new application with PDFNetiOS.dll and customized libTools.a library.
- Part 4: FAQ.
- Part 5: Next steps.
To complete this tutorial, you will need to install the latest version of XCode, which is required because its compilers are used by Xamarin. If you are using an out of date version of XCode you may encounter linker errors. You will also need to install and setup Xamarin.iOS as described in this article.
Wouldn’t it be nice to be able to view a remote PDF the same way as one can view an online video? By this we mean you can see the beginning of the content almost immediately, and if you move to the middle of the content, it is prioritized and loaded very quickly, before other parts.
Unfortunately, with remotely stored PDFs, this is not how things usually work. What typically happens is that the entire file must be downloaded before it can be opened and viewed. This is the case for two reasons:
- PDF documents are not typically linearized (or in Adobe lingo “fast web view”ed). This means that the contents of page twenty, for example, can actually be located in many different places within the file, with no way of being able to quickly determine where the different pieces are. Without this information, the entire document must be downloaded before page two can be displayed.
- Even if a document is linearized, most viewers are not equipped to show partial content. They are designed to work on complete documents and will reject partial documents as corrupted.
There is, however, a better way.
If you’re building a website or HTML5 app, see this post for how to display a PDF in HTML. If you’re building a native program for desktops (Windows, Mac, Linux) or mobile (iOS, Android, WinRT, Windows Phone 8), then read on…
NOTE: This is the getting started document for static framework of PDFNet for iOS. We strongly recommend using the dynamic framework.
This tutorial shows the minimum steps needed to open a PDF using PDFNet. It also shows how to add support for annotations, and opening encrypted documents. This document assumes this use of PDFNet V 6.5.3 or greater. Note that a completed project can be found on our GitHub repository. You should use the latest versions of the PDFNet Framework and the tools source code, available by request on our website. The tutorial is divided into four parts:
- Part 1: Showing a PDF.
- Part 2: Adding support for text selection, annotation creation and editing, link following and form filling.
- Part 3: Adding support for encrypted PDF documents.
- Part 4: Next Steps