PSPDFKit for iOS

The Best Way to Handle PDF Documents on iOS

A high-performance viewer, extensive annotation and document editing tools,
digital signatures, and more. All engineered for the best possible user and
developer experience. PSPDFKit — the iOS PDF SDK made for you.

iOS

Email

Features

The PSPDFKit Components

Our PDF SDK is split into components — start with the parts you need, and add
features as your needs grow.

Apple PDFKit Compatible

Showcase

Apps Powered by PSPDFKit

We’re extremely proud of all the amazing apps that have been built with the help of
PSPDFKit. Our main goal has always been providing developers with the highest-quality
tools so they can focus on making the best apps possible.

Dropbox

Box

Scanbot

Gumroad

Procore

Scribd

“PSPDFKit handles all the heavy lifting involved in viewing and annotating PDF files. Thank you for such a wonderful product!”

Integration

Using PSPDFKit

importPSPDFKitimportPSPDFKitUI// Create the PSPDFDocument.// This is the container for your PDF file. It can also manage multiple files.letdocumentURL=Bundle.main.url(forResource:"Document",withExtension:"pdf")!letdocument=PSPDFDocument(url:documentURL)// Create the PDF view controller. This will present and manage the PSPDFKit UI.letpdfController=PSPDFViewController(document:document)// Present the PDF view controller within a UINavigationController to enable the toolbar.present(UINavigationController(rootViewController:pdfController),animated:true)

@importPSPDFKit;@importPSPDFKitUI;// Create the PSPDFDocument.// This is the container for your PDF file. It can also manage multiple files.NSURL*documentURL=[NSBundle.mainBundleURLForResource:@"Document"withExtension:@"pdf"];PSPDFDocument*document=[[PSPDFDocumentalloc]initWithURL:documentURL];// Create the PDF view controller. This will present and manage the PSPDFKit UI.PSPDFViewController*pdfController=[[PSPDFViewControlleralloc]initWithDocument:document];// Present the PDF view controller within a UINavigationController to enable the toolbar.UINavigationController*navController=[[UINavigationControlleralloc]initWithRootViewController:pdfController];[selfpresentViewController:navControlleranimated:YEScompletion:nil];

importPSPDFKitimportPSPDFKitUIletdocumentURL=Bundle.main.url(forResource:"Document",withExtension:"pdf")!letdocument=PSPDFDocument(url:documentURL)// Use the configuration to set main PSPDFKit options.letconfiguration=PSPDFConfiguration{(builder)in// Switch to continuous vertical scrolling.builder.pageTransition=.scrollContinuousbuilder.scrollDirection=.vertical// Disable the thumbnail bar.builder.thumbnailBarMode=.none// etc.}// Create the PDF view controller, passing the configuration object.letpdfController=PSPDFViewController(document:document,configuration:configuration)present(UINavigationController(rootViewController:pdfController),animated:true)

@importPSPDFKit;@importPSPDFKitUI;NSURL*documentURL=[NSBundle.mainBundleURLForResource:@"Document"withExtension:@"pdf"];PSPDFDocument*document=[[PSPDFDocumentalloc]initWithURL:documentURL];// Use the configuration to set main PSPDFKit options.PSPDFConfiguration*configuration=[PSPDFConfigurationconfigurationWithBuilder:^(PSPDFConfigurationBuilder*builder){// Switch to continuous vertical scrolling.builder.pageTransition=PSPDFPageTransitionScrollContinuous;builder.scrollDirection=PSPDFScrollDirectionVertical;// Disable the thumbnail bar.builder.thumbnailBarMode=PSPDFThumbnailBarModeNone;// etc.}];// Create the PDF view controller, passing the configuration object.PSPDFViewController*pdfController=[[PSPDFViewControlleralloc]initWithDocument:documentconfiguration:configuration];UINavigationController*navController=[[UINavigationControlleralloc]initWithRootViewController:pdfController];[selfpresentViewController:navControlleranimated:YEScompletion:nil];

importPSPDFKitletdocumentURL=// PDF URL from a writable location...letdocument=PSPDFDocument(url:documentURL)// Load a graphic resource from another PDF document.letlogoURL=Bundle.main.url(forResource:"Logo",withExtension:"pdf")!// Create a custom stamp annotation on the first page.letstampAnnotation=PSPDFStampAnnotation()stampAnnotation.appearanceStreamGenerator=PSPDFFileAppearanceStreamGenerator(fileURL:logoURL)stampAnnotation.boundingBox=CGRect(x:180.0,y:150.0,width:444.0,height:500.0)document.add([stampAnnotation])// This is a blocking save.document.save()

@importPSPDFKit;NSURL*documentURL=// PDF URL from a writable location...PSPDFDocument*document=[[PSPDFDocumentalloc]initWithURL:documentURL];// Load a graphic resource from another PDF document.NSURL*logoURL=[NSBundle.mainBundleURLForResource:@"Logo"withExtension:@"pdf"];// Create a custom stamp annotation on the first page.PSPDFStampAnnotation*stampAnnotation=[[PSPDFStampAnnotationalloc]init];stampAnnotation.appearanceStreamGenerator=[[PSPDFFileAppearanceStreamGeneratoralloc]initWithFileURL:logoURL];stampAnnotation.boundingBox=CGRectMake(180.f,150.f,444.f,500.f);[documentaddAnnotations:@[stampAnnotation]options:nil];// This is a blocking save.[documentsave];