- Notifications
You must be signed in to change notification settings - Fork90
A simple toolkit for filling out PDF forms in iOS.
License
derekblair/ILPDFKit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A simple, minimalist toolkit for filling out PDF forms, and extracting PDF data in iOS, that extends the Apple native PDFKit'sPDFView and theCoreGraphics PDF C API.
- Parse and analyze PDF documents with easy API.
- Fill out and save PDF AcroForms to a flat non-editable PDF.
- Handle text, button and combo fields.
- Easy introspection using PDFDocument, PDFPage, PDFDictionary and PDFArray.
- Rapidly, parse, extract and analyze PDF document structure, data and properties.
- Handle signature fields.
- Save AcroForm values to the original, editable PDF.
- Comprehensive Unit and Integration Test Coverage
- Swift Documentation
source'https://github.com/CocoaPods/Specs.git'platform:ios,'11.0'use_frameworks!target'<Your Target Name>'dopodILPDFKitend
Then, run the following command:pod install
To integrate ILPDFKit into your Xcode project using Carthage, specify it in yourCartfile:
github "derekblair/ILPDFKit"Runcarthage update to build the framework and drag the builtILPDFKit.framework into your Xcode project.
The quickest way to get started with ILPDFKit is to take a look at the included sample app. For example, to view a PDF form resource named 'test.pdf' you can do the following:
letdocument=ILPDFDocument(resource:"myPDF")// Manually set a form valuedocument.forms.setValue("Derek", forFormWithName:"Contacts.FirstName")// Save via a static PDF.letflatPDF= document.savedStaticPDFData()
ILPDFKit currently supports a narrow range of PDF versions and is not suitable for a production app that needs to save general PDF files from versions 1.3 to 1.7
PDF features that cause issues with saving include:
Linearized PDF files (Linearization is broken after save. File will open correctly using WKWebView, Preview, and Chrome but Adobe reader fails)
Object Streams (This library can not currently save fields stored in object streams, introduced in PDF 1.5 , files that use object streams are sometimes referred to as compressed files as object streams can compress PDF objects in the file).
pdfViewController=ILPDFViewController(resource:"test.pdf")window.rootViewController= pdfViewController// Have fun filling out the form.
forformin pdfViewController.document.forms{// GetletformValue= form.value;letformName= form.name; // Fully qualified field name.// Setform.value="foo";// If the form is visible on screen it will updated automatically.// You can access the actual associated widget annotation view as below.// let widgetView = form.associatedWidget()}
All fields are easily custom styled.
Donations are greatly appreciated and assist with the development ofILPDFKit.
- Paypal:http://paypal.me/derekblr
(The MIT License)
Copyright (c) 2020 Derek Blair <derekjblair@gmail.com>
Permission is hereby granted, free of charge, to any person obtaininga copy of this software and associated documentation files (the'Software'), to deal in the Software without restriction, includingwithout limitation the rights to use, copy, modify, merge, publish,distribute, sublicense, and/or sell copies of the Software, and topermit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall beincluded in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANYCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THESOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
About
A simple toolkit for filling out PDF forms in iOS.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.

