Represents the PdfGeneralObject within the MegaScript context. Provides methods for PDF manipulation, such as deleting unused options, comparing documents, checking encryption, and combining files.

interface PdfGeneralObject {
    Combine(target: FileInstance, fileData: any): boolean;
    CompareDocuments(a: FileInstance, b: FileInstance, password: any): boolean;
    DeleteUnusedOptions(a: FileInstance, gap: number): boolean;
    IsEncrypted(file: FileInstance): boolean;
}

Methods

  • Combines multiple PDF files into a single PDF file.

    Parameters

    • target: FileInstance

      The file instance object representing the target PDF file.

    • fileData: any

      The data of the files to be combined.

    Returns boolean

    A boolean indicating whether the operation was successful.

  • Compares two PDF documents to check if they are equal.

    Parameters

    • a: FileInstance

      The file instance object representing the first PDF file.

    • b: FileInstance

      The file instance object representing the second PDF file.

    • password: any

      The password for the PDF files, if they are encrypted.

    Returns boolean

    A boolean indicating whether the documents are equal.

  • Deletes unused options from the given PDF file.

    Parameters

    • a: FileInstance

      The file instance object representing the PDF file.

    • gap: number

      The gap parameter used in the deletion process.

    Returns boolean

    A boolean indicating whether the operation was successful.

  • Checks if a given PDF file is encrypted.

    Parameters

    • file: FileInstance

      The file instance object representing the PDF file.

    Returns boolean

    A boolean indicating whether the file is encrypted.