Example Projects
PSPDFKit ships with a few projects containing a lot of examples to help you with your code.
You can find these projects in the Examples
folder of the .dmg
file you downloaded from your customer portal or in the demo download.
What follows is a rundown of the example projects and what they contain.
PSPDFCatalog
This project contains most of the examples. Here you can find Objective-C and Swift sample code for:
PSPDFViewController
customizations- Toolbar customizations
- Annotation processing with
PSPDFProcessor
- Document editing with
PSPDFDocumentEditor
- Multimedia annotations like videos and GIFs
- Forms and digital signatures
- Security-related topics like encryption and password protection
- Import/Export formats like XFDF and JSON
- ...and lots of other use cases.
Tip: PSPDFCatalog also contains the “Kiosk Grid” example, which lets you open every document contained in the
Samples
folder. This means you just have to put your document into theSamples
and you can open it in the kiosk example, with no customizations needed.
PSPDFSimple
This showcases a very common use case of presenting a PDF using a PSPDFViewController
subclass in a storyboard. This very simple project should help you get started.
SwiftExample
This project is written in Swift 4 and contains code for simple use cases of PSPDFProcessor
and PSPDFLibrary
.