Represents a PdfImageObject with methods and properties for PDF image operations.

interface PdfImage {
    BitsPerComponent: number;
    ComponentCount: number;
    Height: number;
    Recompress: ((quality: number) => void);
    Resize: ((newWidth: number, newHeight: number) => void);
    Save: ((file: FileInstance) => boolean);
    Scale: ((factor: number) => void);
    Width: number;
}

Properties

BitsPerComponent: number

Gets the bits per component of the PdfImageObject.

ComponentCount: number

Gets the component count of the PdfImageObject.

Height: number

Gets the height of the PdfImageObject.

Recompress: ((quality: number) => void)

Recompresses the PdfImageObject with the specified JPEG quality.

Type declaration

    • (quality): void
    • Parameters

      • quality: number

        The JPEG quality for recompression.

      Returns void

Resize: ((newWidth: number, newHeight: number) => void)

Resizes the PdfImageObject to the specified dimensions.

Type declaration

    • (newWidth, newHeight): void
    • Parameters

      • newWidth: number

        The new width for the image.

      • newHeight: number

        The new height for the image.

      Returns void

Save: ((file: FileInstance) => boolean)

Saves the PdfImageObject to a file.

Type declaration

    • (file): boolean
    • Parameters

      • file: FileInstance

        The FileInstance object representing the file to save. Returns true if the save was successful, false otherwise.

      Returns boolean

Scale: ((factor: number) => void)

Scales the PdfImageObject by the specified factor.

Type declaration

    • (factor): void
    • Parameters

      • factor: number

        The scaling factor.

      Returns void

Width: number

Gets the width of the PdfImageObject.