mindee
    Preparing search index...

    Class PathInput

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    filename: string = ""
    fileObject: Buffer = ...
    filepath?: string
    inputPath: string
    inputType: string
    mimeType: string = ""

    Methods

    • Compresses the file object, either as a PDF or an image.

      Parameters

      • quality: number = 85

        Quality of the compression. For images, this is the JPEG quality. For PDFs, this affects image quality within the PDF.

      • maxWidth: null | number = null

        Maximum width for image resizing. Ignored for PDFs.

      • maxHeight: null | number = null

        Maximum height for image resizing. Ignored for PDFs.

      • forceSourceText: boolean = false

        For PDFs, whether to force compression even if source text is present.

      • disableSourceText: boolean = true

        For PDFs, whether to disable source text during compression.

      Returns Promise<void>

      A Promise that resolves when the compression is complete.