[]
type PageViewport = object;
PDF page viewport created based on scale, rotation and offset.
height: number;
height
scale: number;
scale
transform: number[];
Viewport transform.
viewBox: number[];
viewBox
width: number;
width
clone(args): PageViewport;
Clone viewport.
Partial
<PageViewport
>
PageViewport
convertToPdfPoint(x, y): number[];
Converts viewport coordinates to the PDF location. Useful for converting canvas pixel location(top/left) into PDF location (bottom/left).
any
The x-coordinate.
any
The y-coordinate.
number
[]
convertToViewportPoint(x, y): number[];
Converts PDF point to the viewport coordinates. Useful for converting PDF location (bottom/left) into canvas pixel coordinates(top/left).
number
The x-coordinate.
number
The y-coordinate.
number
[]
convertToViewportRectangle(rect): number[];
Converts PDF rectangle to the viewport coordinates.
number
[]
The xMin, yMin, xMax and yMax coordinates.
number
[]