Metadata

  • Common PDF metadata keys.

    Declaration

    Objective-C

    typedef NSString *PSPDFMetadataName
  • 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
  • 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