Options
All
  • Public
  • Public/Protected
  • All
Menu

Inserts an image into a PDF.

Hierarchy

Index

Constructors

constructor

  • new PDFImage(image: string, x: number, y: number, page?: string | number, rotation?: number, width?: number, height?: number, maxWidth?: number): PDFImage
  • Parameters

    • image: string

      The image's base64 string or URL.

    • x: number

      X component of this object's position.

    • y: number

      Y component of this object's position.

    • page: string | number = 'all'

      Page to include this object on. Either "all" or an integer. Defaults to "all".

    • Optional rotation: number

      Rotation in degrees. Optional.

    • Optional width: number

      Image width in px. Optional.

    • Optional height: number

      Image height in px. Optional.

    • Optional maxWidth: number

      Max image height in px (for scaling purposes). Optional.

    Returns PDFImage

Properties

height

height: undefined | number

image

image: string

maxWidth

maxWidth: undefined | number

page

page: string | number

rotation

rotation: undefined | number

width

width: undefined | number

x

x: number

y

y: number

Methods

asInnerDict

  • asInnerDict(): {}
  • Returns {}

    dict representation of this PDFInsertObject

    • [key: string]: string | number

Static identifier

  • identifier(): string

Generated using TypeDoc