PageViewport: { clone: any; convertToPdfPoint: any; convertToViewportPoint: any; convertToViewportRectangle: any; height: number; offsetX: number; offsetY: number; rotation: number; scale: number; transform: number[]; viewBox: number[]; width: number }

PDF page viewport created based on scale, rotation and offset.

Type declaration

  • clone:function
  • convertToPdfPoint:function
    • Converts viewport coordinates to the PDF location. Useful for converting canvas pixel location(top/left) into PDF location (bottom/left).

      Parameters

      • x: any

        The x-coordinate.

      • y: any

        The y-coordinate.

      Returns number[]

  • convertToViewportPoint:function
    • Converts PDF point to the viewport coordinates. Useful for converting PDF location (bottom/left) into canvas pixel coordinates(top/left).

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      Returns number[]

  • convertToViewportRectangle:function
    • Converts PDF rectangle to the viewport coordinates.

      Parameters

      • rect: number[]

        The xMin, yMin, xMax and yMax coordinates.

      Returns number[]

  • height: number

    height

  • offsetX: number
  • offsetY: number
  • rotation: number
  • scale: number

    scale

  • transform: number[]

    Viewport transform.

  • viewBox: number[]

    viewBox

  • width: number

    width