PDFInfo

public class PDFInfo
extension PDFInfo: Equatable

Information saved in PDF file metadata

  • Title of document

    Declaration

    Swift

    public var title: String
  • Author of document

    Declaration

    Swift

    public var author: String
  • Subject of document

    Declaration

    Swift

    public var subject: String
  • Keywords of document

    Declaration

    Swift

    public var keywords: [String]
  • The owner password of the PDF document

    If this password is set the document is encrypted; otherwise, the document will not be encrypted.

    Declaration

    Swift

    public var ownerPassword: String?
  • The user password of the PDF document

    If the document is encrypted, then this value will be the user password for the document.

    Declaration

    Swift

    public var userPassword: String?
  • Whether the document allows printing when unlocked with the user password.

    Declaration

    Swift

    public var allowsPrinting: Bool
  • Whether the document allows copying when unlocked with the user password.

    Declaration

    Swift

    public var allowsCopying: Bool
  • Creates a new object to manage the information metadata of a PDFDocument

    Declaration

    Swift

    public init(
        title: String = "Title",
        author: String = "Author",
        subject: String = "Subject",
        keywords: [String] = ["tppdf", "pdf", "generator"],
        ownerPassword: String? = nil,
        userPassword: String? = nil,
        allowsPrinting: Bool = true,
        allowsCopying: Bool = true
    )

    Parameters

    title

    See title for details.

    author

    See author for details.

    subject

    See subject for details.

    keywords

    See keywords for details.

    ownerPassword

    See ownerPassword for details.

    userPassword

    See userPassword for details.

    allowsPrinting

    See allowsPrinting for details.

    allowsCopying

    See allowsCopying for details.

  • nodoc

    Declaration

    Swift

    public static func == (lhs: PDFInfo, rhs: PDFInfo) -> Bool