Classes

The following classes are available globally.

  • This class allows a transparent decryption of AES256 encrypted files using the RNCryptor file format https://github.com/RNCryptor/RNCryptor-Spec/blob/master/RNCryptor-Spec-v3.md

    Legacy PSPDFKit old file format is also supported. Use the provided encryption tool to prepare your documents.

    Ensure your passphrase/salt are also protected within the binary, or at least obfuscated. Encryption marginally slows down rendering, since everything is decrypted on the fly.

    If saving annotations to a file managed by a PSPDFAESCryptoDataProvider, the whole file will be re-written.

    Note

    The initializers will return nil if the strong encryption feature is not enabled, or if you pass an invalid parameter configuration.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFAESCryptoDataProvider : NSObject <PSPDFFileDataProviding>

    Swift

    class AESCryptoDataProvider : NSObject, FileDataProviding
  • The data sink that works with PSPDFAESCryptoDataProvider

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAESCryptoDataSink : NSObject <PSPDFDataSink>

    Swift

    class AESCryptoDataSink : NSObject, DataSink
  • Declaration

    Objective-C

    
    @interface PSPDFAESCryptoInputStream : PSPDFCryptoInputStream

    Swift

    class AESCryptoInputStream : CryptoInputStream
  • Declaration

    Objective-C

    
    @interface PSPDFAESCryptoOutputStream : PSPDFCryptoOutputStream

    Swift

    class AESCryptoOutputStream : CryptoOutputStream
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAbstractFormAction : PSPDFAction

    Swift

    class AbstractFormAction : Action
  • Base class for Line, Polygon and PolyLine annotations.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAbstractLineAnnotation : PSPDFAbstractShapeAnnotation

    Swift

    class AbstractLineAnnotation : AbstractShapeAnnotation
  • The base class for Ink, Rectangle, Circle, Line, Polygon and PolyLine annotations.

    These annotations are created in the UI using PSPDFDrawView.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAbstractShapeAnnotation : PSPDFAnnotation

    Swift

    class AbstractShapeAnnotation : Annotation
  • Defines an action that is defined in the PDF spec, either from an outline or an annotation object. See the Adobe PDF Specification for more about actions and action types.

    Note

    The PDF spec defines both ‘destinations’ and ‘actions’. PSPDFKit will convert a ‘destination’ into an equivalent PSPDFActionTypeGoTo.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFAction : PSPDFModel <NSSecureCoding>

    Swift

    class Action : ModelObject, NSSecureCoding
  • PSPDFAnnotation is the base class for all PDF annotations and forms.

    Don’t directly make an instance of this class, use subclasses like PSPDFNoteAnnotation or PSPDFLinkAnnotation. This class will return nil if initialized directly, unless with the type PSPDFAnnotationTypeUndefined.

    PSPDFAnnotationManager searches the runtime for subclasses of PSPDFAnnotation and builds up a dictionary using supportedTypes.

    As well as the various annotation subclasses, there are two types to model annotation types:

    • PSPDFAnnotationType is mostly used for the type of an existing annotation. As an option set, it can be convenient to add and remote types from certain API such as the PSPDFConfiguration’s editableAnnotationTypes.
    • PSPDFAnnotationString is mostly used as the type of a tool for creating annotations. As well as annotation types it includes pure tools such as PSPDFAnnotationStringEraser. The tools are activated in the UI with PSPDFAnnotationToolbar and PSPDFAnnotationStateManager.

    Note

    Thread safety: Annotation objects should only ever be edited on the main thread. Modify properties on the main thread only if they are already active (for creation, it doesn’t matter which thread creates them). Before rendering, obtain a copy of the annotation to ensure it’s not mutated while properties are read. Once the documentProvider is set, modifying properties on a background thread will throw an exception.

    Annotation properties are specified in normalized PDF coordinates: they take page rotation and CropBox offset into account. Prior to PSPDFKit 8 for iOS and PSPDFKit 3 for macOS properties were specified in PDF coordinates: not taking the page rotation and offset into account. After unarchiving annotations from NSCoder archives created with older versions of PSPDFKit, the properties will be untransformed, and will be modified to apply the page transform when the annotation is added to a document.

    Annotations contain internal state once they are attached to a document. Don’t take them and add them to another document. Instead, create a new annotation and set the properties relevant for you, and add this annotation.

    Warning

    Annotations are mutable objects. Do not store them in NSSet or other objects that require a hash-value that does not change.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotation : PSPDFModel <PSPDFUndoSupport, NSSecureCoding>

    Swift

    class Annotation : ModelObject, UndoSupport, NSSecureCoding
  • A PSPDFAnnotationAppearanceStream manages an image to include as part of an annotation appearance (ie. a handwritten signature). Supported filetypes are .JPG and .PDF. For PDF files, the first page of the document is used.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationAppearanceStream : NSObject
  • Used to configure custom annotation groups for the annotation toolbar.

    [[PSPDFAnnotationToolbarConfiguration alloc] initWithAnnotationGroups:@[
    
    [PSPDFAnnotationGroup groupWithItems:@[
    [PSPDFAnnotationGroupItem itemWithType:PSPDFAnnotationStringInk variant:PSPDFAnnotationVariantStringInkPen
    configurationBlock:[PSPDFAnnotationGroupItem inkConfigurationBlock]]]],
    
    [PSPDFAnnotationGroup groupWithItems:@[
    [PSPDFAnnotationGroupItem itemWithType:PSPDFAnnotationStringLine],
    [PSPDFAnnotationGroupItem itemWithType:PSPDFAnnotationStringPolyLine]]]
    ]];
    
    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationGroup : PSPDFModel
  • An annotation group items defines one annotation type, optionally with a variant.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationGroupItem : PSPDFModel
  • Collects annotations from the various PSPDFAnnotationProvider implementations.

    Usually you want to add your custom PSPDFAnnotationProvider instead of subclassing this class. If you subclass, use overrideClass:withClass: in PSPDFDocument.

    This class will set the documentProvider on both annotation adding and retrieving. You don’t have to handle this in your annotationProvider subclass.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationManager
        : NSObject <PSPDFAnnotationProviderChangeNotifier, PSPDFOverridable>

    Swift

    class AnnotationManager : NSObject, AnnotationProviderChangeNotifier, Overridable
  • An annotation set may be used to add and position multiple annotations.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSet : PSPDFModel <NSFastEnumeration, NSSecureCoding>

    Swift

    class AnnotationSet : ModelObject, NSFastEnumeration, NSSecureCoding
  • Defines an annotation style.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationStyle : PSPDFModel <NSSecureCoding>

    Swift

    class AnnotationStyle : ModelObject, NSSecureCoding
  • The default implementation for the style manager.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDefaultAnnotationStyleManager
        : NSObject <PSPDFAnnotationStyleManager>

    Swift

    class PDFDefaultAnnotationStyleManager : NSObject, AnnotationStyleManager
  • Produces a summary of the annotations in a document.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationSummarizer : NSObject

    Swift

    class AnnotationSummarizer : NSObject
  • Specifies a list the toolbar annotation items and their grouping. The PSPDFAnnotationToolbar accepts multiple configurations and will use the most matching one.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAnnotationToolbarConfiguration : PSPDFModel

    Swift

    class AnnotationToolConfiguration : ModelObject
  • Advanced appearance characteristics for a widget annotation. It contains additional information for constructing the annotation’s appearance stream

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAppearanceCharacteristics
        : PSPDFModel <NSSecureCoding, PSPDFOverridable>

    Swift

    class AppearanceCharacteristics : ModelObject, NSSecureCoding, Overridable
  • The default security auditor simply returns YES for every request.

    Declaration

    Objective-C

    
    @interface PSPDFDefaultApplicationPolicy : NSObject <PSPDFApplicationPolicy>

    Swift

    class DefaultApplicationPolicy : NSObject, ApplicationPolicy
  • Abstract subclass that contains an asset from a link

    See more

    Declaration

    Objective-C

    
    @interface PSPDFAssetAnnotation : PSPDFLinkAnnotation

    Swift

    class AssetAnnotation : LinkAnnotation
  • Keeps track of executed Action instances, allowing us to navigate through the action history.

    Note

    This class is conceptually similar to WKBackForwardList.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFBackForwardActionList : NSObject <PSPDFOverridable>

    Swift

    class BackForwardActionList : NSObject, Overridable
  • Used for various configuration options.

    See

    PSPDFConfiguration
    See more

    Declaration

    Objective-C

    
    @interface PSPDFBaseConfiguration<
        BuilderType : __kindof PSPDFBaseConfigurationBuilder *> : PSPDFModel

    Swift

    class BaseConfiguration<BuilderType> : ModelObject where BuilderType : BaseConfigurationBuilder
  • Base class for building a configuration object.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBaseConfigurationBuilder : NSObject

    Swift

    class BaseConfigurationBuilder : NSObject
  • A PSPDFSignatureContents instance that returns zeroed data.

    Declaration

    Objective-C

    
    @interface PSPDFBlankSignatureContents : NSObject <PSPDFSignatureContents>

    Swift

    class BlankSignatureContents : NSObject, PDFSignatureContents
  • A bookmark encapsulates a PDF action and a name. It is managed by a document’s bookmark manager.

    See

    PSPDFBookmarkManager
    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmark
        : PSPDFModel <NSCopying, NSMutableCopying, NSSecureCoding, PSPDFOverridable>

    Swift

    class Bookmark : ModelObject, NSCopying, NSMutableCopying, NSSecureCoding, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFMutableBookmark : PSPDFBookmark

    Swift

    class MutableBookmark : Bookmark
  • The PSPDFBookmarkManager manages bookmarks for a given PSPDFDocument.

    You should not initialize a bookmark manager yourself but instead access it through the document’s bookmarkManager property.

    Bookmarks and PDF files

    The concept of bookmarks does not exist in a PDF document. Therefore all the bookmarks you add will be stored inside the PDF but are only read by PSPDFKit and Apple Preview. If you want to support other formats, you need to create your own bookmark provider and store them yourself.

    Subclassing

    You should not subclass PSPDFBookmarkManager. Instead attach a custom bookmark provider to achieve your desired behavior.

    Thread Safety

    PSPDFBookmarkManager is thread safe and can be accessed from any thread. To ensure multiple operations are executed as one serial block without other threads interfering, wrap you operations in performBlock: or performBlockAndWait: whenever you need to do complex operations.

    However, if you need to do something that can be achieved by calling a single method on this class (e.g. adding a bookmark or removing a known bookmark), call the appropriate method directly as it is more performant than wrapping calls in the above mentioned block calls.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmarkManager : NSObject

    Swift

    class BookmarkManager : NSObject
  • Button Form Element (check boxes, radio buttons, regular form push buttons)

    See more

    Declaration

    Objective-C

    
    @interface PSPDFButtonFormElement : PSPDFFormElement <NSSecureCoding>

    Swift

    class ButtonFormElement : FormElement, NSSecureCoding
  • Represents one button form field in a PDF form. They come in three variants:

    • A push button that can have a action attached to it.
    • A check box that can be independently checked or unchecked.
    • A radio button that are mutually exclusive.

    A PSPDFButtonFormField can be the parent of multiple buttons, like a RadioButton group.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFButtonFormField : PSPDFFormField

    Swift

    class ButtonFormField : PDFFormField
  • The PSPDFCache is responsible for managing the memory and disk cache of rendered images.

    Usually you do not access any methods of PSPDFCache directly but instead schedule a PSPDFRenderTask in a PSPDFRenderQueue which will then reach out to the cache and check if there are images available before rendering a new one.

    See

    PSPDFRenderTask
    See more

    Declaration

    Objective-C

    
    @interface PSPDFCache : NSObject

    Swift

    class PDFCache : NSObject
  • A caret annotation (PDF 1.5) is a visual symbol that indicates the presence of text edits, and share much similarity with note (text) annotations.

    Declaration

    Objective-C

    
    @interface PSPDFCaretAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class CaretAnnotation : Annotation, Overridable
  • Choice Form Element.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFChoiceFormElement : PSPDFFormElement

    Swift

    class ChoiceFormElement : FormElement
  • Represents a choice form field in a PDF form. This allows the user to select one of the given options or, if isEdit is YES, enter their own option value.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFChoiceFormField : PSPDFFormField

    Swift

    class ChoiceFormField : PDFFormField
  • The PDF Circle annotations (PDF 1.3) shall display an ellipse on the page.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFCircleAnnotation
        : PSPDFAbstractShapeAnnotation <PSPDFOverridable>

    Swift

    class CircleAnnotation : AbstractShapeAnnotation, Overridable
  • Model class used to define custom color presets.

    See

    PSPDFStyleManager
    See more

    Declaration

    Objective-C

    
    @interface PSPDFColorPreset : PSPDFModel <PSPDFStylePreset>

    Swift

    class ColorPreset : ModelObject, PSPDFStylePreset
  • Default container for annotations. It’s crucial that you use this class as your base class if you implement a custom annotation provider, because this class offers efficient undo/redo which otherwise is almost impossible to replicate unless you understand the PSPDFKit internals extremely well.

    This class conforms to the deprecated protocol PSPDFAnnotationProviderRefreshing. In a future release, this protocol will be removed. The reason is that this class handles refreshing internally. This class will continue to conform to PSPDFAnnotationProvider.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFContainerAnnotationProvider
        : NSObject <PSPDFAnnotationProviderRefreshing, PSPDFUndoSupport>

    Swift

    class PDFContainerAnnotationProvider : NSObject, PSPDFAnnotationProviderRefreshing, UndoSupport
  • PSPDFConversionOperation is the base class for all PDF conversion operations.

    Warning

    Do not create instances of this class or its subclasses. They are intended to be initiated internally by PSPDFProcessor.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFConversionOperation : NSOperation

    Swift

    class ConversionOperation : Operation
  • An implementation of PSPDFDataProviding that acts upon a file. All file access is coordinated with file coordination (NSFileCoordinator). This class implements the optional conflict resolution methods of PSPDFCoordinatedFileDataProviding.

    Declaration

    Objective-C

    
    @interface PSPDFCoordinatedFileDataProvider
        : PSPDFFileDataProvider <PSPDFCoordinatedFileDataProviding, NSFilePresenter>

    Swift

    class CoordinatedFileDataProvider : FileDataProvider, CoordinatedFileDataProviding, NSFilePresenter
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFCryptoInputStream : NSInputStream
    
    /// Returns nil if the encryption feature is not enabled.
    - (nullable instancetype)initWithInputStream:(NSInputStream *)stream decryptionBlock:(nullable NSInteger (^)(PSPDFCryptoInputStream *superStream, uint8_t *buffer, NSInteger len))decryptionBlock;
    
    /**
     Set the decryption handler. If no decryption block is called, this input stream will simply pass the data through.
     Return the length of the decrypted buffer. This block is assuming you are decrypting inline.
    
     @note Set this property before the input stream is being used.
     */
    @property (nonatomic, copy) NSInteger (^decryptionBlock)(PSPDFCryptoInputStream *stream, uint8_t *buffer, NSInteger len);
    
    @end

    Swift

    class CryptoInputStream : InputStream
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFCryptoOutputStream : NSOutputStream
    
    /// Returns nil if the encryption feature is not enabled.
    - (nullable instancetype)initWithOutputStream:(NSOutputStream *)stream encryptionBlock:(NSData * (^)(PSPDFCryptoOutputStream *stream, const uint8_t *buffer, NSUInteger len))encryptionBlock;
    
    /**
     Set the encryption handler. If no encryption block is called, this output stream will simply pass the data through.
     
     @note Set this property before the output stream is being used.
     */
    @property (nonatomic, copy) NSData * (^encryptionBlock)(PSPDFCryptoOutputStream *stream, const uint8_t *buffer, NSUInteger len);
    
    @end

    Swift

    class CryptoOutputStream : OutputStream
  • Simple class that encrypts/decrypts files in a format compatible to PSPDFAESCryptoDataProvider.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFCryptor : NSObject

    Swift

    class Cryptor : NSObject
  • An implementation of PSPDFDataProviding that operates on a single NSData.

    This may be used to initialize PSPDFDocument with data.

    Warning

    You might want to set a custom UID otherwise the UID will be calculated from a part of the PDF contents, which might be the same if the files are similar.

    Note

    When using this data provider, PSPDFKit is unable to automatically save annotation changes back into the PDF. Keep in mind that iOS is an environment without virtual memory. Loading a large PDF will simply get your app killed by the iOS watchdog while you try to allocate more memory than is available.

    If you use NSData because of encryption, look into PSPDFAESCryptoDataProvider or a custom implementation of PSPDFDataProviding instead for a way to dynamically decrypt the needed portions of the PDF.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDataContainerProvider : NSObject <PSPDFDataProviding>

    Swift

    class DataContainerProvider : NSObject, DataProviding
  • Declaration

    Objective-C

    
    @interface PSPDFDataContainerSink : NSObject <PSPDFDataSink>

    Swift

    class DataContainerSink : NSObject, DataSink
  • Note

    Requires the PSPDFFeatureMaskDigitalSignatures feature flag.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDigitalSignatureReference : NSObject

    Swift

    class DigitalSignatureReference : NSObject
  • Represents a possible destination directory.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDirectory : PSPDFModel <NSSecureCoding>

    Swift

    class Directory : ModelObject, NSSecureCoding
  • The disk cache persists its metadata on disk together with the images and provides cached images even after the app restarts.

    The disk cache is designed to store and fetch images, including metadata, in a fast way. No actual images will be held in memory (besides during the time they are scheduled for writing to disk).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDiskCache : NSObject

    Swift

    class DiskCache : NSObject
  • The PSPDFDocument class represents a set of PDF sources that are displayed as one document.

    The PDF sources are internally represented as data providers (implementations of the PSPDFDataProviding protocol). The typical use case is to initialize the document with a single fileURL, which creates an implicit PSPDFCoordinatedFileDataProvider by default. You can also opt to use NSData or custom implementations of PSPDFDataProviding as sources during initialization.

    This object can be created on any thread. Accessing properties is thread safe but might take some time, as the underlying PDF documents need to be processed to fetch data like pageCount or title. The document builds an internal cache, so subsequent access is faster. For this reason, ensure that document objects are not created/destroyed randomly for maximum efficiency.

    PSPDFDocument supports NSFastEnumeration by enumerating over its documentProviders. The document providers are internal wrappers around the data providers created during initialization.

    Note

    Not all state is archived with NSCoder.

    Note

    Ensure that a PSPDFDocument is only opened by one PSPDFViewController at any time. Also ensure that subclasses do not implement their own equality semantics, and instead use the UID property to check if two documents are equal.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocument
        : NSObject <PSPDFDocumentProviderDelegate, PSPDFOverridable, NSCopying,
                    NSSecureCoding, NSFastEnumeration,
                    PSPDFFileCoordinationDelegate>

    Swift

    class Document : NSObject, DocumentProviderDelegate, Overridable, NSCopying, NSSecureCoding, NSFastEnumeration, FileCoordinationDelegate
  • A checkpointer handles autosaving of annotations for recovery in case of a crash that occurs without saving. A checkpoint is a small file that contains all the changes made to the document that haven’t been saved. The checkpoint is created according to the strategy. On a save of the document, it is automatically deleted.

    Note

    Checkpoints are not supported for multi-provider PSPDFDocuments, or documents that are encrypted.

    Note

    This class is thread safe.

    Note

    You must not create instances of this class yourself, and instead use the checkpointer property on PSPDFDocument.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentCheckpointer : NSObject

    Swift

    class DocumentCheckpointer : NSObject
  • Manages document editing. Supports operations such as remove, move, rotate and add page.

    Note

    This class requires the Document Editor component to be enabled for your license.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentEditor : NSObject <PSPDFOverridable>

    Swift

    class PDFDocumentEditor : NSObject, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentEditorConfigurationBuilder
        : PSPDFBaseConfigurationBuilder
  • Configuration options for various document editor controllers.

    Note

    Set the configuration values before passing this object to view controllers for display.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentEditorConfiguration
        : PSPDFBaseConfiguration <PSPDFDocumentEditorConfigurationBuilder *>
  • Represents a page size option for new pages.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPageSize : PSPDFModel <NSSecureCoding>

    Swift

    class PageSize : ModelObject, NSSecureCoding
  • Define a compression used for image compression.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFCompression : PSPDFModel <NSSecureCoding>

    Swift

    class Compression : ModelObject, NSSecureCoding
  • PSPDFDocumentFeatures provides the main interface for querying features and registering observers.

    It conforms to PSPDFDocumentFeaturesSource itself, but additionally to the document features source protocol it also guarantees that it implements all methods of this protocol. Therefore it is save to query every feature on an instance of this class without checking its availability for.

    Usually you access this class through PSPDFDocument‘s features property. So if you, for example, want to check if a document can be modified, you can check document.features.canModify.

    See

    -[PSPDFDocument features]

    Threading

    PSPDFDocumentFeatures is thread safe and can be used from any thread. This also means that your custom sources will be called from various threads and queues. Do not rely on being called on a particular thread in your custom sources.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentFeatures : NSObject <PSPDFDocumentFeaturesSource>

    Swift

    class PDFDocumentFeatures : NSObject, PDFDocumentFeaturesSource
  • This class allows you to modify a PDF document’s metadata. Metadata is defined in two ways in the PDF spec (§ 14.3):

    Info dictionary support

    All values specified in the Info dictionary are represented by the following types:

    • NSString
    • NSNumber
    • NSDate
    • NSArray<id>: can include any of the types mentioned.
    • NSDictionary<NSString*, id>: value can be any of the types mentioned.

    These types can be combined in any way you see fit and it will be converted into the proper PDF types.

    Note

    The PDF stream type is not yet supported.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentPDFMetadata : NSObject

    Swift

    class PDFMetadata : NSObject
  • A PSPDFDocument consists of one or multiple PSPDFDocumentProvider‘s. Each document provider has exactly one data source (file/data/dataProvider)

    Note

    This class is used within PSPDFDocument and should not be instantiated externally.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentProvider : NSObject <PSPDFOverridable>

    Swift

    class PDFDocumentProvider : NSObject, Overridable
  • This class describes the security options you want to use when saving a PDF file. Using a security options object overrides the default options of a file.

    A PDF file can have multiple security-related options set. The owner password generally controls the editing of a document and is required as soon as you want to encrypt a document of any kind. The user password prevents users from viewing the PDF. It is optional but if you specify it you also need to specify an owner password.

    You can also specify the key length of the encryption. This controls how large the key is that is used for actually encrypting the document. The key is derived from the passwords you specify. As soon as you specify at least an owner password you also need to decide on a key length to be used. You can also specify PSPDFDocumentSecurityOptionsKeyLengthAutomatic in all cases and let PSPDFKit decide on if and what key length to use.

    To specify what operations are allowed when opening the document with user privileges you can also set PSPDFDocumentPermissions. With user privileges you can always view the file in question and by specifying PSPDFDocumentPermissions you can grant further rights that otherwise would only be available when the user has owner privileges.

    PSPDFKit supports two encryption algorithms: RC4 and AES. RC4 is a proprietary encryption algorithm of RSA Security Inc. It is a symmetric stream cipher, ie. the same algorithm is used for both encryption and decryption, and the algorithm does not change the length of the data. AES support was introduced with PDF 1.6. It is a symmetric block cipher, ie. the same algorithm is used for both encryption and decryption, and the length of the data when encrypted is rounded up to a multiple of the block size, which is fixed in this implementation to always be 16 bytes.

    Note

    In order to use this class, you need a license that enables you to use the Document Editor. If you want to process a file while keeping the options of the original file, simply pass nil for security options.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentSecurityOptions : NSObject
  • This class allows you to modify a PDF document’s metadata. Metadata is defined in two ways in the PDF spec (§ 14.3):

    XMP support

    This class implements limited XMP support. You can only set and retrieve simple strings.

    Namespaces

    Each key in the XMP metadata stream has to have a namespace set. You can define your own namespace or use one of the already existing ones. PSPDFKit exposes two constants for common namespaces:

    When setting a value, you also have to pass along a suggested namespace prefix, as this can’t be automatically generated.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDocumentXMPMetadata : NSObject

    Swift

    class XMPMetadata : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFDownloadManager : NSObject
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    #pragma mark Configuration
    
    /// The maximum number of concurrent downloads. Defaults to 2.
    /// If `enableDynamicNumberOfConcurrentDownloads` is enabled, this property will change dynamically
    /// and must be considered readonly.
    @property (nonatomic) NSUInteger numberOfConcurrentDownloads;
    
    /// Enable this property to let `PSPDFDownloadManager` decide what the best number of concurrent downloads
    /// is depending on the network connection. Defaults to YES.
    @property (nonatomic) BOOL enableDynamicNumberOfConcurrentDownloads;
    
    /// The `PSPDFDownloadManager` delegate.
    @property (nonatomic, weak) id<PSPDFDownloadManagerDelegate> delegate;
    
    /// Controls if objects that are currently loading when the app moves to the background
    /// should be completed in the background. Defaults to YES. iOS only.
    @property (nonatomic) BOOL shouldFinishLoadingObjectsInBackground;
    
    #pragma mark Enqueueing and Dequeueing Objects
    
    /// See enqueueObject:atFront:. Enqueues the object at the end of the queue.
    - (void)enqueueObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Enqueues an `PSPDFRemoteContentObject` for download. If the object is already downloading,
    /// nothing is enqueued. If the object has been downloaded previously and has failed, it will be
    /// removed from the failedObjects array and re-enqueued.
    ///
    /// @param object The object to enqueue.
    /// @param enqueueAtFront Set this to YES to add the object to the front of the queue.
    - (void)enqueueObject:(id<PSPDFRemoteContentObject>)object atFront:(BOOL)enqueueAtFront;
    
    /// Calls enqueueObject:atFont: multiple times. Enqueues the object at the end of the queue.
    ///
    /// @param objects need to implement the `PSPDFRemoteContentObject` protocol.
    - (void)enqueueObjects:(NSArray<id<PSPDFRemoteContentObject>> *)objects;
    
    /// Calls enqueueObject:atFont: multiple times.
    ///
    /// @param objects need to implement the `PSPDFRemoteContentObject` protocol.
    - (void)enqueueObjects:(NSArray<id<PSPDFRemoteContentObject>> *)objects atFront:(BOOL)enqueueAtFront;
    
    /// Cancels the download process for the given object.
    ///
    /// @param object The object to be cancelled.
    - (void)cancelObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Calls `cancelObject:` for all objects in `pendingObjects`, `loadingObjects`, and `failedObjects`.
    - (void)cancelAllObjects;
    
    #pragma mark State
    
    /// The current reachability of the device.
    @property (nonatomic, readonly) PSPDFReachability reachability;
    
    /// Contains all objects waiting to be downloaded.
    @property (nonatomic, copy, readonly) NSArray<id<PSPDFRemoteContentObject>> *waitingObjects;
    
    /// Contains all currently loading objects.
    @property (nonatomic, copy, readonly) NSArray<id<PSPDFRemoteContentObject>> *loadingObjects;
    
    /// Contains all objects that have failed because of a network error and are scheduled for retry.
    @property (nonatomic, copy, readonly) NSArray<id<PSPDFRemoteContentObject>> *failedObjects;
    
    /// Helper that iterates loadingObjects, waitingObjects and failedObjects (in that order) and returns all matches.
    - (NSArray<id<PSPDFRemoteContentObject>> *)objectsPassingTest:(BOOL (^)(id<PSPDFRemoteContentObject> obj, NSUInteger index, BOOL *stop))predicate;
    
    /// Checks if the given object is currently handled by the download manager.
    ///
    /// @param object The object.
    /// @return YES if the download manager handles the object, that is if it is either pending, loading or failed.
    - (BOOL)handlesObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Checks and returns the current state of a given object. If the object has never been enqueued,
    /// `PSPDFDownloadManagerObjectStateNotHandled` will be returned.
    ///
    /// @param object The object.
    /// @return The state of the object.
    - (PSPDFDownloadManagerObjectState)stateForObject:(id<PSPDFRemoteContentObject>)object;
    
    @end

    Swift

    class DownloadManager : NSObject
  • The default appearance stream generator.

    Calls -[PSPDFAnnotation drawInContext:options:] and transforms it into an appearance stream.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDrawingContextAppearanceStreamGenerator
        : NSObject <PSPDFAppearanceStreamGenerating>

    Swift

    class DrawingContextAppearanceStreamGenerator : NSObject, AppearanceStreamGenerating
  • Represents a change that was performed by PSPDFDocumentEditor.

    See

    PSPDFDocumentEditor
    See more

    Declaration

    Objective-C

    
    @interface PSPDFEditingChange : PSPDFModel

    Swift

    class PDFEditingChange : ModelObject
  • Represents an embedded file.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFEmbeddedFile : PSPDFModel

    Swift

    class EmbeddedFile : ModelObject
  • An embedded go-to action (PDF 1.6) is similar to a remote go-to action but allows jumping to or from a PDF file that is embedded in another PDF file.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFEmbeddedGoToAction : PSPDFGoToAction

    Swift

    class EmbeddedGoToAction : GoToAction
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFile : PSPDFModel

    Swift

    class File : ModelObject
  • PDF File Attachment Annotation (see 12.5.6.15, “File attachment annotations”). A file attachment annotation (PDF 1.3) contains a reference to a file, which typically shall be embedded in the PDF file (see 7.11.4, “Embedded file streams”).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class FileAnnotation : Annotation, Overridable
  • An implementation of the PSPDFAnnotationProvider protocol that uses the PDF document as source/target to load/save annotations. You almost always want to use the PSPDFFileAnnotationProvider in your PSPDFAnnotationManager. You can also use this class inside a custom annotation provider, to parse PDF annotations once and then manage them in your custom database.

    Note

    Subclassing PSPDFFileAnnotationProvider will lead to slower PSPDFProcessor performance and is strongly discouraged. This will be blocked in future versions.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileAnnotationProvider
        : PSPDFContainerAnnotationProvider <PSPDFOverridable>

    Swift

    class PDFFileAnnotationProvider : PDFContainerAnnotationProvider, Overridable
  • An appearance stream generator that takes an NSURL to any PDF file and returns it as the appearance stream.

    Custom appearance streams are only intended to be used with stamp annotations to create a vector stamp. Using this class with other annotation types is not supported.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileAppearanceStreamGenerator
        : NSObject <PSPDFAppearanceStreamGenerating>

    Swift

    class FileAppearanceStreamGenerator : NSObject, AppearanceStreamGenerating
  • An implementation of PSPDFDataProviding that acts upon a file.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileDataProvider : NSObject <PSPDFFileDataProviding>

    Swift

    class FileDataProvider : NSObject, FileDataProviding
  • A data sink backed by a file on disk

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileDataSink : NSObject <PSPDFDataSink>

    Swift

    class FileDataSink : NSObject, DataSink
  • This class encapsulates the metadata associated with a document used in the PSPDFLibraryFileSystemDataSource

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFileIndexItemDescriptor : NSObject <NSSecureCoding>

    Swift

    class FileIndexItemDescriptor : NSObject, NSSecureCoding
  • The default file manager implementation is a thin wrapper around NSFileManager.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFDefaultFileManager : NSObject <PSPDFFileManager>

    Swift

    class DefaultFileManager : NSObject, FileManager
  • Coordinates file presenters and notifications. Observed presenters are automatically unregistered in response to UIApplicationDidEnterBackgroundNotification notification.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFilePresenterCoordinator : NSObject

    Swift

    class FilePresenterCoordinator : NSObject
  • Represents a PDF form element.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFormElement : PSPDFWidgetAnnotation <NSSecureCoding>

    Swift

    class FormElement : WidgetAnnotation, NSSecureCoding
  • A form field represents one logical field in the PDF form. Use a PSPDFFormParser to retrieve them. You can access the form parser from a PSPDFDocument or PSPDFDocumentProvider.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFormField : PSPDFModel <PSPDFUndoSupport, NSSecureCoding>

    Swift

    class PDFFormField : ModelObject, UndoSupport, NSSecureCoding
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFFormOption : NSObject <NSSecureCoding>
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    /// Initializes an instance of this class with a label and value.
    - (instancetype)initWithLabel:(NSString *)label value:(NSString *)value NS_DESIGNATED_INITIALIZER;
    
    /// The label of the option which should be presented to the user.
    @property (nonatomic, readonly) NSString *label;
    
    /// The value that gets exported for the given option. Can be the same as `label`
    @property (nonatomic, readonly) NSString *value;
    
    @end

    Swift

    class PDFFormOption : NSObject, NSSecureCoding
  • Parses PDF Forms (“AcroForms”). This will not create objects based on the (soon deprecated) XFA standard.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFormParser : NSObject <PSPDFOverridable>

    Swift

    class PDFFormParser : NSObject, Overridable
  • PDF FreeText Annotation.

    A free text annotation (PDF 1.3) displays text directly on the page. Unlike an ordinary text annotation (see 12.5.6.4, “Text Annotations”), a free text annotation has no open or closed state; instead of being displayed in a pop-up window, the text shall be always visible.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFFreeTextAnnotation
        : PSPDFAnnotation <PSPDFRotatable, PSPDFOverridable>

    Swift

    class FreeTextAnnotation : Annotation, Rotatable, Overridable
  • Represents a single character (glyph, quad) on the PDF page.

    Note

    Glyphs are created from the PDF contents and not meant to be created manually.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFGlyph : NSObject <NSCopying, NSSecureCoding>

    Swift

    class Glyph : NSObject, NSCopying, NSSecureCoding
  • Defines the action of going to a specific location within the PDF document.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFGoToAction : PSPDFAction

    Swift

    class GoToAction : Action
  • A hide action (PDF 1.2) hides or shows one or more annotations on the screen by setting or clearing their Hidden flags (see 12.5.3, “Annotation Flags”). This type of action can be used in combination with appearance streams and trigger events (Sections 12.5.5, “Appearance Streams,” and 12.6.3, “Trigger Events”) to display pop-up help information on the screen.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFHideAction : PSPDFAction

    Swift

    class HideAction : Action
  • Text Highlight Annotation

    Warning

    If you programmatically create a highlight annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFHighlightAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class HighlightAnnotation : TextMarkupAnnotation, Overridable
  • A PSPDFDocument subclass that can be used to display and annotate image files. Can handle JPEG and PNG images.

    Note

    Any transparency on PNG images will be lost after saving.

    Saving changes flattens any annotations into the image and writes it back to the original file. Creating a new document will then reflect the new image with flattened changes. Keep the image document in memory to preserve the ability to edit added annotations.

    See https://pspdfkit.com/guides/ios/current/annotations/annotate-images/ for more information.

    Note

    PSPDFImageDocument requires the Image Documents feature to be enabled for your license to work.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFImageDocument : PSPDFDocument

    Swift

    class ImageDocument : Document
  • Defines the position if an image in the PDF.

    Note

    This class should not be manually instantiated. Use PSPDFTextParser to fetch images.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFImageInfo : NSObject <NSCopying, NSSecureCoding>

    Swift

    class ImageInfo : NSObject, NSCopying, NSSecureCoding
  • An ink annotation for freehand drawing or writing.

    This annotation type is referred to as Drawing in the PSPDFKit UI. It allows the user to add one or more strokes on top of PDF content.

    The lines are automatically scaled when the boundingBox is changed, and the boundingBox is updated when the lines are changed to enclose the new points.

    See

    The annotation tool is activated in the UI by PSPDFAnnotationStateManager and PSPDFAnnotationToolbar. The drawing interaction is handled by PSPDFDrawView. Some drawing-related behaviors can be set in the PSPDFConfiguration, such as with its drawCreateMode property, which controls whether a new ink annotation is created after each stroke).
    See more

    Declaration

    Objective-C

    
    @interface PSPDFInkAnnotation : PSPDFAbstractShapeAnnotation <PSPDFOverridable>

    Swift

    class InkAnnotation : AbstractShapeAnnotation, Overridable
  • Defines an action that contains JavaScript to be executed in the document context.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFJavaScriptAction : PSPDFAction

    Swift

    class JavaScriptAction : Action
  • PSPDFKit - The Leading PDF Framework for iOS, Android and the Web. This is the configuration object for framework-global settings.

    Note

    The PSPDFKit shared object is a global, thread-safe key/value store. Use setValue:forKey: and valueForKey: or the subscripted variants to set/get properties.

    Subclassing notes: In PSPDFKit various classes can be subclassed and registered as subclasses via overrideClass:withClass: on PSPDFDocument (model) and PSPDFConfiguration (view/controller). See https://pspdfkit.com/guides/ios/current/getting-started/overriding-classes/ for details.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFKitGlobal : NSObject

    Swift

    class SDK : NSObject
  • Parses Page Labels (see PDF Reference §8.3.1) Add custom labels with Adobe Acrobat. http://www.w3.org/WAI/GL/WCAG20-TECHS/PDF17.html

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLabelParser : NSObject <PSPDFOverridable>

    Swift

    class LabelParser : NSObject, Overridable
  • PSPDFLibrary implements a sqlite-based full-text-search engine. You set a data source that provides the documents to be indexed by the library, and then call -updateIndex, which performs its work asynchronously. Then, you can search for keywords within that collection. Typically, you use a PSPDFLibraryFileSystemDataSource. There can be multiple libraries, although usually one is enough for the common use case. Furthermore, when using multiple libraries with spotlight indexing enabled could lead to duplicates in users’ spotlight results. See https://pspdfkit.com/guides/ios/current/features/indexed-full-text-search/ for further documentation.

    Note

    Requires the PSPDFFeatureMaskIndexedFTS feature flag.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFLibrary : NSObject

    Swift

    class PDFLibrary : NSObject
  • A library data source that indexes all documents in a specified directory. This class will automatically add and remove files from the library based on changes in the directory.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLibraryFileSystemDataSource : NSObject <PSPDFLibraryDataSource>

    Swift

    class LibraryFileSystemDataSource : NSObject, LibraryDataSource
  • This class is a subclass of PSPDFSearchResult, and encapsulates a preview generated by PSPDFLibrary. Mainly, it prevents access of the annotation property of PSPDFSearchResult, and instead provides an annotationObjectNumber property to represent a matched annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLibraryPreviewResult : PSPDFSearchResult

    Swift

    class LibraryPreviewResult : SearchResult
  • PDF Line annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLineAnnotation : PSPDFAbstractLineAnnotation <PSPDFOverridable>

    Swift

    class LineAnnotation : AbstractLineAnnotation, Overridable
  • The PSPDFLinkAnnotation represents both classic PDF page/document/web links, and more types not supported by other PDF readers (video, audio, image, etc)

    PSPDFKit will automatically figure out the type for PDF link annotations loaded from a document, based on the file type. (“mp4” belongs to PSPDFLinkAnnotationVideo; a YouTube-URL to PSPDFLinkAnnotationYouTube, etc)

    If you create a PSPDFLinkAnnotation at runtime, be sure to set the correct type and use the URL parameter for your link. boundingBox defines the frame, in PDF space coordinates.

    If you want to customize how links look in the PDF, customize PSPDFLinkAnnotationView’s properties. There’s currently no mapping between color/lineWidth/etc and the properties of the view. This might change in a future release.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFLinkAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class LinkAnnotation : Annotation, Overridable
  • The memory cache holds images in memory to give the render engine access to them as fast as possible. By default its memory constraints are configured to get the best performance out of the current device.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFMemoryCache : NSObject

    Swift

    class MemoryCache : NSObject
  • An abstract base class for model objects, using reflection to provide sensible default behaviors.

    The default implementations of , -hash, and -isEqual: make use of the +propertyKeys method.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFModel : NSObject <NSCopying>

    Swift

    class ModelObject : NSObject, NSCopying
  • Defines methods used to work with actions in PDF documents, some of which are named in the Adobe PDF Specification.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFNamedAction : PSPDFAction

    Swift

    class NamedAction : Action
  • This class configures a new page for the PSPDFProcessor or PSPDFDocumentEditor. You can configure what type of page it should be and also add images or logos from a PDF.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFNewPageConfiguration : NSObject

    Swift

    class PDFNewPageConfiguration : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFNewPageConfigurationBuilder : PSPDFModel

    Swift

    class NewPageConfigurationBuilder : ModelObject
  • PDF Note (Text) Annotation.

    Note

    Note annotations are rendered as fixed size; much like how Adobe Acrobat renders them. PSPDFKit will always render note annotations at a fixed size of 32x32pt. We recommend that you set the boundingBox to the same value.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFNoteAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class NoteAnnotation : Annotation, Overridable
  • Operation that converts a local Office file to PDF by sending it to a server.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFOfficeConversionOperation
        : PSPDFConversionOperation <NSProgressReporting>

    Swift

    class OfficeConversionOperation : ConversionOperation, ProgressReporting
  • Represents a single outline/table of contents element.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFOutlineElement : PSPDFModel

    Swift

    class OutlineElement : ModelObject
  • Parses the Outline/Table of Contents of a PDF.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFOutlineParser : NSObject <PSPDFOverridable>

    Swift

    class OutlineParser : NSObject, Overridable
  • A PKCS12 container holding a private key and certificate.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPKCS12 : NSObject <NSSecureCoding>

    Swift

    class PKCS12 : NSObject, NSSecureCoding
  • Concrete implementation of a PSPDFSigner.

    This class augments the functionality of its superclass by supporting password-protected PKCS12 files (.p12 extension).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPKCS12Signer : PSPDFSigner

    Swift

    class PKCS12Signer : PDFSigner
  • An instance of this class represents a PKCS7 (https://tools.ietf.org/html/rfc2315) cryptographic container. This container format is the most common format used for signing PDFs digitally. For example, you can use an instance of this class when you want to sign a document that was already prepared for deferred digital signing. One example scenario may be the following:

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPKCS7 : NSObject

    Swift

    class PKCS7 : NSObject
  • Represents PDF page data. Managed within PSPDFDocumentProvider.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPageInfo : NSObject <NSCopying, NSSecureCoding>

    Swift

    class PDFPageInfo : NSObject, NSCopying, NSSecureCoding
  • A formatter to convert a range of pages into a user facing string.

    The page label formatter uses the label of a document’s page if it has one assigned to it and falls back to the page number (the page index + 1 that is) otherwise.

    All page ranges are treated as referring to a page’s index, starting at 0. The first page therefore has index 0 and is visualized as page 1 if there is no label set for the page.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPageLabelFormatter : NSFormatter

    Swift

    class PageLabelFormatter : Formatter
  • A PSPDFPageTemplate helps PSPDFNewPageConfiguration configure a new page to be added to a document correctly.

    You can modify the templates available via PSPDFConfiguration, or setting the pageTemplates property on the PSPDFDocumentEditorConfiguration builder.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPageTemplate : PSPDFModel <NSSecureCoding>

    Swift

    class PageTemplate : ModelObject, NSSecureCoding
  • Polyline annotations (PDF 1.5) are similar to polygons (`PSPDFPolygonAnnotation), except that the first and last vertex are not implicitly connected.

    Note

    See PSPDFAbstractLineAnnotation for details how to use and initialize.

    Declaration

    Objective-C

    
    @interface PSPDFPolyLineAnnotation
        : PSPDFAbstractLineAnnotation <PSPDFOverridable>

    Swift

    class PolyLineAnnotation : AbstractLineAnnotation, Overridable
  • Polygon annotations (PDF 1.5) display closed polygons on the page. Such polygons may have any number of vertices connected by straight lines. Polyline annotations (PDF 1.5) are similar to polygons, except that the first and last vertex are not implicitly connected.

    Note

    See PSPDFAbstractLineAnnotation for details how to use and initialize.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFPolygonAnnotation
        : PSPDFAbstractLineAnnotation <PSPDFOverridable>

    Swift

    class PolygonAnnotation : AbstractLineAnnotation, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPopupAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class PopupAnnotation : Annotation, Overridable
  • Represents a cryptographic private key.

    Supported encodings are PKCS1 (https://tools.ietf.org/html/rfc8017) and PCKS8 (https://tools.ietf.org/html/rfc5208).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFPrivateKey : NSObject

    Swift

    class PrivateKey : NSObject
  • Create, merge or modify PDF documents. Can also flatten annotation data.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFProcessor : NSObject

    Swift

    class Processor : NSObject
  • Container for various settings for manipulating documents with PSPDFProcessor.

    Note

    Some basic options are available without the Document Editor component, however most options do require this component to be licensed. Learn more at https://pspdfkit.com/pdf-sdk/ios/document-editor/
    See more

    Declaration

    Objective-C

    
    @interface PSPDFProcessorConfiguration : NSObject <NSCopying>
  • Represents an item that can be added to either a new page or an existing page. The item can either be a UIImage which will then be compressed as a JPEG using imageJpegCompressionQuality or a NSURL that points to a JPEG or PDF file.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFProcessorItem : NSObject

    Swift

    class ProcessorItem : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    
    @interface PSPDFProcessorItemBuilder : PSPDFModel

    Swift

    class PDFProcessorItemBuilder : ModelObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFRSAKey : NSObject
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    /// The underlying public key scheme.
    @property (nonatomic, readonly) NSString *publicKeyScheme;
    
    /// Returns the approximate length of the security parameter. For example, for RSA this is the size of the modulus.
    @property (nonatomic, readonly) NSInteger keyLength;
    
    @end

    Swift

    class RSAKey : NSObject
  • Redaction Annotation

    Used to remove content from a document.

    color can be used to change the color of the overlay text. It has no effect if there is no overlay text specified. Defaults to a red color. fillColor specifies the background color of the redaction area after is has been applied. The color is drawn on all the specified rects. Defaults to black. lineWidth can be set to change the border width of the redaction in its marked state. Defaults to 5.

    Note

    Supports redacting text, images, paths, annotations, and forms.

    Note

    Redaction annotations need to be applied, after they were created and added to a document, to remove the content beneath them. See PSPDFProcessorConfiguration or PSPDFDocumentSaveOptionApplyRedactions for further information.

    Warning

    When programmatically creating a redaction annotation, both boundingBox and rects need to be set. The rects array contains boxed variants of CGRect (NSValue).

    See more

    Declaration

    Objective-C

    
    @interface PSPDFRedactionAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class RedactionAnnotation : Annotation, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFRemoteFileObject : NSObject<PSPDFRemoteContentObject>
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    /// Designated initializer.
    - (instancetype)initWithRemoteURL:(NSURL *)remoteURL targetURL:(NSURL *)targetFileURL fileManager:(id<PSPDFFileManager>)fileManager NS_DESIGNATED_INITIALIZER;
    
    /// The remote URL to fetch the content from.
    @property (nonatomic, copy, readonly) NSURL *remoteURL;
    @property (nonatomic, copy, readonly) NSURL *targetURL;
    
    #pragma mark PSPDFRemoteContentObject
    
    /// The remote content of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, nullable) NSURL *remoteContent;
    
    /// The loading state of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, getter=isLoadingRemoteContent) BOOL loadingRemoteContent;
    
    /// The download progress of the object. Only meaningful if `loadingRemoteContent` is YES.
    /// This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic) CGFloat remoteContentProgress;
    
    /// The remote content error of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, nullable) NSError *remoteContentError;
    
    /// The completion block.
    @property (nonatomic, copy, nullable) void (^completionBlock)(id<PSPDFRemoteContentObject> remoteObject);
    
    @end

    Swift

    class RemoteFileObject : NSObject, RemoteContentObject
  • Defines an action to go to a specific page index in another PDF document. Can be either used directly via a page index, or via a named destination, which will be resolved before executing the action. This covers both RemoteGoTo and Launch actions.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFRemoteGoToAction : PSPDFGoToAction

    Swift

    class RemoteGoToAction : GoToAction
  • Defines the options to apply when rendering PDF pages, such as color inversion, filters, colors and annotation behavior.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFRenderOptions : PSPDFModel <NSSecureCoding>

    Swift

    class RenderOptions : ModelObject, NSSecureCoding
  • The render queue is responsible for scheduling and completing tasks. Typically you don’t create your own render queue but instead use the render queue provided by the render manager. Creating your own render queue is possible but due to internal resource constraints will almost never speed up rendering but instead the queues try to access the same resources and then need to wait until the resource becomes available.

    The goal of the render queue is to keep the average time it takes to complete a render task at a minimum. To achieve this the render queue intelligently schedules and bundles tasks. Therefore the order in which scheduled tasks are executed is undefined and depends on many factors.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFRenderQueue : NSObject

    Swift

    class RenderQueue : NSObject
  • A render request specifies the exact parameters of how an image should be rendered. You use it in order to configure a PSPDFRenderTask which can then be passend to a PSPDFRenderQueue in order to fulfill the task.

    To create a new render request you usually create a PSPDFMutableRenderRequest and set the properties you need.

    Thread safety

    PSPDFRenderRequest is not thread safe, you should never modify a mutable render request from multiple threads nor should you modify a mutable render request while reading data from it on a different thread.

    As soon as you hand over ownership of a render request to the render engine, it is copied, so that you do not need to worry about thread safety between your render requests and the ones the render engine holds.

    See

    PSPDFRenderTask

    See

    PSPDFMutableRenderRequest
    See more

    Declaration

    Objective-C

    
    @interface PSPDFRenderRequest : NSObject <NSCopying, NSMutableCopying>

    Swift

    class RenderRequest : NSObject, NSCopying, NSMutableCopying
  • The mutual version of a render request can be used to configure it so that it matches the desired request.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFMutableRenderRequest : PSPDFRenderRequest

    Swift

    class MutableRenderRequest : RenderRequest
  • A render task is used to create an image from the page (or part of it) of a document.

    Depending on the PSPDFRenderRequest cache policy, a render task checks the cache before actually triggering a new rendering.

    You create a render task by passing it an instance of PSPDFRenderRequest. Once you have created a render request make sure to fully set it up before scheduling it in a render queue.

    A simple example of requesting an image from a page:

    PSPDFMutableRenderRequest *request = [[PSPDFMutableRenderRequest alloc] initWithDocument:document];
    request.pageIndex = pageIndex;
    request.imageSize = CGSizeMake(320.0, 480.0);
    
    PSPDFRenderTask *task = [[PSPDFRenderTask alloc] initWithRequest:request];
    task.priority = PSPDFRenderQueuePriorityUtility;
    task.delegate = self;
    
    [PSPDFKitGlobal.sharedInstance.renderManager.renderQueue scheduleTask:task];
    
    let request = PSPDFMutableRenderRequest(document: document)
    request.pageIndex = 0
    request.imageSize = CGSize(width: 320.0, height: 480.0)
    
    let task = PSPDFRenderTask(request: request)!
    task.priority = .utility
    task.delegate = self
    
    PSPDFKitGlobal.sharedInstance.renderManager.renderQueue.schedule(task)
    
    See more

    Declaration

    Objective-C

    
    @interface PSPDFRenderTask : NSObject

    Swift

    class RenderTask : NSObject
  • A rendition action (PDF 1.5) controls the playing of multimedia content (see PDF Reference 1.7, 13.2, “Multimedia”).

    Note

    JavaScript actions are not supported.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFRenditionAction : PSPDFAction

    Swift

    class RenditionAction : Action
  • Reset Form Action.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFResetFormAction : PSPDFAbstractFormAction

    Swift

    class ResetFormAction : AbstractFormAction
  • An appearance stream generator that makes sure to retain the current appearance stream.

    Declaration

    Objective-C

    
    @interface PSPDFRetainExistingAppearanceStreamGenerator
        : NSObject <PSPDFAppearanceStreamGenerating>

    Swift

    class RetainExistingAppearanceStreamGenerator : NSObject, AppearanceStreamGenerating
  • RichMedia annotations are defined in the ISO32000 Adobe Supplement and are the modern way of embedding video content. PSPDFKit also supports the matching RichMediaExecute action to control video state.

    Declaration

    Objective-C

    
    @interface PSPDFRichMediaAnnotation : PSPDFAssetAnnotation <PSPDFOverridable>

    Swift

    class RichMediaAnnotation : AssetAnnotation, Overridable
  • A rich-media-execute action identifies a rich media annotation and specifies a command to be sent to that annotation’s handler. (See Section 9.6, “Rich Media” on page 76 of the Adobe® Supplement to the ISO 32000)

    See more

    Declaration

    Objective-C

    
    @interface PSPDFRichMediaExecuteAction : PSPDFAction

    Swift

    class RichMediaExecuteAction : Action
  • A screen annotation (PDF 1.5) specifies a region of a page upon which media clips may be played. It also serves as an object from which actions can be triggered. PSPDFKit also supports the matching Rendition Actions to control the video play state.

    Note

    iOS cannot play all video/audio formats that can be used for PDF.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFScreenAnnotation : PSPDFAssetAnnotation <PSPDFOverridable>

    Swift

    class ScreenAnnotation : AssetAnnotation, Overridable
  • Represents an immutable search result from PSPDFTextSearch

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSearchResult : PSPDFModel

    Swift

    class SearchResult : ModelObject
  • This configuration builder offers all properties of PSPDFSignatureAppearance in a writable version.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureAppearanceBuilder : PSPDFBaseConfigurationBuilder

    Swift

    class PDFSignatureAppearanceBuilder : BaseConfigurationBuilder
  • This class configures the appearance that a PSPDFSignatureElement will have in a document when signed.

    By default, a digital signature form element will show information from the signing certificate, like the signer’s name, the date when the document was signed, and so on. Use a PSPDFSignatureAppearance instance when you want to configure further how this information is presented to the user.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureAppearance
        : PSPDFBaseConfiguration <PSPDFSignatureAppearanceBuilder *>

    Swift

    class PDFSignatureAppearance : BaseConfiguration<PDFSignatureAppearanceBuilder>
  • An instance of PSPDFSignatureBiometricProperties represents properties which add biometric information to a digital signature, for enhanced security. Biometric information includes the input method pressure values, time intervals when the signature was being created, or average touch radius.

    This information is encrypted and stored inside the PDF document using the signer’s public key, and can be decrypted with the appropriate private key.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureBiometricProperties : NSObject <NSSecureCoding>

    Swift

    class PDFSignatureBiometricProperties : NSObject, NSSecureCoding
  • Container object for storing a signature containing an ink annotation and an optional signer.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureContainer : NSObject <NSSecureCoding, PSPDFOverridable>

    Swift

    class SignatureContainer : NSObject, NSSecureCoding, Overridable
  • Signature Form Element.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureFormElement : PSPDFFormElement

    Swift

    class SignatureFormElement : FormElement
  • Represents a signature form field in a PDF form.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureFormField : PSPDFFormField

    Swift

    class SignatureFormField : PDFFormField
  • Signature info for signature form fields.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureInfo : NSObject

    Swift

    class PDFSignatureInfo : NSObject
  • Manages signature handlers for digital signature creation. Thread safe.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureManager : NSObject

    Swift

    class PDFSignatureManager : NSObject
  • Represents entries in the signature properties. Signatures can have properties that describe how and when they were built.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignaturePropBuild : NSObject

    Swift

    class PDFSignaturePropBuild : NSObject
  • Represents one entry in the signature properties.

    Signatures can have properties that describe how and when they were built.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignaturePropBuildEntry : NSObject

    Swift

    class PDFSignaturePropBuildEntry : NSObject
  • Represents the status of a digital signature after it has been validated.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureStatus : NSObject

    Swift

    class PDFSignatureStatus : NSObject
  • This class validates digital signatures in a PDF document. Validation consists of two steps: Checking that the signature integrity is correct (that is, the document was not modified after it was signed), and ensuring that the chain of certificates contained in the signature is trusted.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSignatureValidator : NSObject

    Swift

    class PDFSignatureValidator : NSObject
  • PSPDFSigner is an abstract signer class. Override methods in subclasses as necessary.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSigner
        : NSObject <PSPDFDocumentSignerDelegate, PSPDFDocumentSignerDataSource,
                    PSPDFExternalSignature, NSSecureCoding>

    Swift

    class PDFSigner : NSObject, PDFDocumentSignerDelegate, PDFDocumentSignerDataSource, ExternalSignature, NSSecureCoding
  • A sound annotation (PDF 1.2) shall analogous to a text annotation except that instead of a text note, it contains sound recorded from the iOS device’s microphone or imported from a file.

    To ensure maximum compatibility set the boundingBox for sound annotations to the same size Adobe Acrobat uses (20x15pt). PSPDFKit will always render sound annotations at a fixed size of 74x44pt, centered in the provided boundingBox.

    Note

    Make sure you configured Microphone Permissions in your app. See https://pspdfkit.com/guides/ios/current/getting-started/permissions/#toc_microphone-permissions for futher documentation.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFSoundAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class SoundAnnotation : Annotation, Overridable
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface PSPDFSoundAnnotationController : NSObject
    
    /**
     Stops any currently active recording or playback, except the sender.
     If the sender is nil, all annotations are stopped.
     */
    + (void)stopRecordingOrPlaybackForAllExcept:(nullable id)sender;
    
    /// Checks if we have permission to record.
    + (void)requestRecordPermission:(nullable void (^)(BOOL granted))block;
    
    PSPDF_EMPTY_INIT_UNAVAILABLE
    
    - (instancetype)initWithSoundAnnotation:(PSPDFSoundAnnotation *)annotation NS_DESIGNATED_INITIALIZER;
    
    /// The controlled sound annotation.
    @property (nonatomic, weak, readonly) PSPDFSoundAnnotation *annotation;
    
    /// The current playback state.
    @property (nonatomic, readonly) PSPDFSoundAnnotationState state;
    
    /// The duration of the audio playback
    @property (nonatomic, readonly) NSTimeInterval playbackDuration;
    
    /// Starts or resumes playback.
    - (BOOL)startPlayback:(NSError **)error;
    
    /// Pauses playback or recording.
    - (void)pause;
    
    /// Stops playback or recording.
    - (BOOL)stop:(NSError **)error;
    
    #if !TARGET_OS_WATCH
    
    /// The audio player object. Only available if playback is ongoing or prepared.
    @property (nonatomic, readonly, nullable) AVAudioPlayer *audioPlayer;
    
    #endif
    
    #if PSPDF_HAS_RECORDING_FEATURE
    
    /// Starts or resumes recording.
    - (BOOL)startRecording:(NSError **)error;
    
    /// Discards the current recording.
    - (void)discardRecording;
    
    #endif
    
    @end

    Swift

    class SoundAnnotationController : NSObject
  • The PDF Square annotations (PDF 1.3) shall display a rectangle on the page.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSquareAnnotation
        : PSPDFAbstractShapeAnnotation <PSPDFOverridable>

    Swift

    class SquareAnnotation : AbstractShapeAnnotation, Overridable
  • Text Squiggly Annotation

    Warning

    If you programmatically create a squiggly annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFSquigglyAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class SquigglyAnnotation : TextMarkupAnnotation, Overridable
  • PDF stamp annotation.

    Stamp annotations that have no image and no known stampType will render their title. title is a PSPDFKit addition that is not part of the PDF specification.

    Stamps may be rotated using the rotation property from PSPDFRotatable. Rotation is not supported for vector stamps.

    Note

    Make sure you configured Image Permissions in your app. See https://pspdfkit.com/guides/ios/current/getting-started/permissions/#toc_image-permissions for further documentation.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFStampAnnotation
        : PSPDFAnnotation <PSPDFRotatable, PSPDFOverridable>

    Swift

    class StampAnnotation : Annotation, Rotatable, Overridable
  • Text StrikeOut Annotation

    Warning

    If you programmatically create a strikeout annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFStrikeOutAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class StrikeOutAnnotation : TextMarkupAnnotation, Overridable
  • Submit-Form-Action: Send data to a uniform resource locator. PDF 1.2.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFSubmitFormAction : PSPDFAbstractFormAction

    Swift

    class SubmitFormAction : AbstractFormAction
  • Represents multiple words forming a text block. (e.g. a Column)

    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextBlock : NSObject <NSCopying, NSSecureCoding>

    Swift

    class TextBlock : NSObject, NSCopying, NSSecureCoding
  • Text field form element.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextFieldFormElement : PSPDFFormElement

    Swift

    class TextFieldFormElement : FormElement
  • Represents a text form field in a PDF form. Allows the user to enter custom text.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextFormField : PSPDFFormField

    Swift

    class TextFormField : PDFFormField
  • Base class for Highlight, Underline, StrikeOut and Squiggly annotations. You should never create instances of this class directly. Use one of its subclasses instead.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextMarkupAnnotation : PSPDFAnnotation

    Swift

    class TextMarkupAnnotation : Annotation
  • Parses text and glyph data of a PDF page.

    Note

    Do not instantiate this class directly. Instead, use -[PSPDFDocument textParserForPageAtIndex:]. Properties are evaluated lazily and cached.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextParser : NSObject <PSPDFOverridable>

    Swift

    class TextParser : NSObject, Overridable
  • Manages search operations for a specific document. You can copy this class to be able to use it on your custom class. (and set a different delegate) Copying will preserve all settings except the delegate.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFTextSearch : NSObject <NSCopying, PSPDFOverridable>

    Swift

    class TextSearch : NSObject, NSCopying, Overridable
  • Opens a URL target. This can be similar to a PSPDFRemoteGoToAction if a pspdfkit:// URL with a page target is used.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFURLAction : PSPDFAction

    Swift

    class URLAction : Action
  • Text Underline Annotation

    Warning

    If you programmatically create an underline annotation, you need to both set the boundingBox AND the rects array. The rects array contains boxed variants of CGRect (NSValue).

    Declaration

    Objective-C

    
    @interface PSPDFUnderlineAnnotation
        : PSPDFTextMarkupAnnotation <PSPDFOverridable>

    Swift

    class UnderlineAnnotation : TextMarkupAnnotation, Overridable
  • This is a custom undo manager that can coalesce similar changes within the same group. This class is thread safe.

    PSPDFKit creates instances of this class internally and makes them available on various objects. You should not create new instances of this class yourself.

    Note

    Only use a perform/lock block if you’re not in any other lock controlled by PSPDFKit.
    See more

    Declaration

    Objective-C

    
    @interface PSPDFUndoController : NSObject

    Swift

    class UndoController : NSObject
  • Undocumented

    Declaration

    Objective-C

    @interface PSPDFVersionDummy : NSObject
    @end

    Swift

    class PSPDFVersionDummy
  • The PDF ‘Widget’ annotation. A Widget usually is a button, much like a link annotation.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFWidgetAnnotation : PSPDFAnnotation <PSPDFOverridable>

    Swift

    class WidgetAnnotation : Annotation, Overridable
  • Represents a word. Formed out of (usually) multiple glyphs.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFWord : NSObject <NSCopying, NSSecureCoding>

    Swift

    class Word : NSObject, NSCopying, NSSecureCoding
  • This class represents a X.509 certificate.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFX509 : NSObject

    Swift

    class X509 : NSObject
  • Concrete implementation of the PSPDFAnnotationProvider protocol that uses a XFDF file as a source.

    The XFDF file needs to be local and in a writable location, not on a web server. This annotation provider handles data form fields according to the XFDF spec: “An XFDF file with form data contains form field names and values. When importing XFDF into Acrobat, the target PDF file must already contain the form fields. Importing XFDF updates the form field values in the PDF file. Exporting to XFDF puts the current value of the field in the value element. Using XFDF, it is not possible to create a new form field in a PDF document, or change anything other than the value of an existing form field.” It compliments an existing data form fields from PDF with values from the XFDF file. If data form field value is not found in the XFDF file it will be served by this provider with the default value.

    If you use XFDF to fill out form elements, you will want to keep both the file annotation provider and the xfdf provider around, using following order: annotationProviders = [xfdfProvider, fileProvider]. Without the fileProvider, form elements will not be found. (In versions of PSPDFKit earlier than 7.5, we did that somewhat magically. This requirement has now been made explicit.)

    Note

    Requires the PSPDFFeatureMaskAnnotationEditing feature flag.

    Note

    If an error occurs when attaching a parsed annotation a document, the error is logged and the annotation is skipped.

    Warning

    If the XFDF contains annotations with page indicies beyond the length of the document, then warnings will be logged and those annotations will be skipped.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFXFDFAnnotationProvider : PSPDFContainerAnnotationProvider

    Swift

    class XFDFAnnotationProvider : PDFContainerAnnotationProvider
  • Declaration

    Objective-C

    
    @interface PSPDFXFDFParser : NSObject

    Swift

    class XFDFParser : NSObject
  • Writes an XML in XFDF standard from PSPDFKit annotations. http://partners.adobe.com/public/developer/en/xml/XFDF_Spec_3.0.pdf

    See more

    Declaration

    Objective-C

    
    @interface PSPDFXFDFWriter : NSObject

    Swift

    class XFDFWriter : NSObject