• Instructs the given handler to zoom its content so that it would fit into a page of the given dimensions. The values are in centimetres, unless you specify in the third argument to the method that the dimensions are inches.

    Parameters

    • handlerId: string

      ID of the handler to scale.

    • dimensions: PageDimensions

      PageDimensions to fit into.

    • margins: Margins = ...

      Optional margins to use (in [top,right,bottom,left] format). Values here are expressed in whatever you specify for units, which defaults to CENTIMETERS if you leave it empty.

    • units: string = "CENTIMETERS"

      Optional units, defaults to CENTIMETERS.

    Returns number

Version :