pdfextract API
    Preparing search index...

    Interface ExtractImageOptions

    Export options. Omitting both bounds requests native dimensions; supplying a bound explicitly requests a thumbnail.

    interface ExtractImageOptions {
        annotations?: boolean;
        composite?: boolean;
        maxHeight?: number;
        maxWidth?: number;
        occurrenceId?: string;
        onProgress?: (event: ProgressEvent) => void;
        preserveOrientation?: boolean;
        scale?: number;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index
    annotations?: boolean

    Include annotation appearances (stamps, markup, form fields) in a composite. Defaults to the document's annotations option (false).

    composite?: boolean

    Render the image together with everything the page draws above it (text, vector graphics, other images) in drawing order, cropped to the image's area. Defaults to the document's composite option (false). Occurrences that are not overlaid, clipped, covered by an included annotation or dependent on an unsupported graphics state export the exact stored pixels instead, unless scale is set; see ExtractedImage.composited.

    maxHeight?: number

    Positive maximum thumbnail height in pixels. The full export is unchanged by preview generation.

    maxWidth?: number

    Positive maximum thumbnail width in pixels. Aspect ratio is preserved and images are not enlarged.

    occurrenceId?: string

    Placement whose on-page orientation is applied; defaults to the image's first occurrence.

    onProgress?: (event: ProgressEvent) => void

    Called during work. Keep callbacks lightweight and avoid throwing.

    preserveOrientation?: boolean

    Return the raster in its stored orientation instead of how the placement shows it on the page. By default, mirrored and quarter-turn placements are corrected losslessly (see ImageOrientation).

    scale?: number

    Positive factor applied to the native size of a composite; default 1. Any other value always renders the composite (composited is 'above', or 'page' when the draw cannot be isolated), even for occurrences that would otherwise export the exact stored pixels. Ignored without composite.

    signal?: AbortSignal

    Aborts queued work promptly; a synchronous engine decode already running may finish before cleanup.