# Type alias PageViewport

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

  - clone(args: Partial<PageViewport>): PageViewport

  - Clone viewport.

    #### Parameters

    - ##### args: Partial<PageViewport>

    #### Returns PageViewport

- ##### convertToPdfPoint:function

  - convertToPdfPoint(x: any, y: any): number[]

  - 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

  - convertToViewportPoint(x: number, y: number): number[]

  - 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

  - convertToViewportRectangle(rect: number[]): number[]

  - 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