PageCanvas

constructor(@NonNull pageSize: Size, @NonNull callback: NewPage.OnDrawCanvasCallback)

PDF page created from a Canvas holding all the draw calls.

Parameters

pageSize

Canvas page size in PDF points.

callback

An NewPage.OnDrawCanvasCallback that should be called to perform the drawing on the canvas.


constructor(@NonNull pageSize: Size, @NonNull callback: NewPage.OnDrawCanvasCallback, @NonNull matrix: Matrix)

PDF page created from a Canvas holding all the draw calls.

Parameters

pageSize

Canvas page size in PDF points.

callback

An NewPage.OnDrawCanvasCallback that should be called to perform the drawing on the canvas.

matrix

Custom transformation matrix for the drawn content, identity matrix means alignment on bottom left at coordinate (0,0).


constructor(@NonNull pageSize: Size, @NonNull callback: NewPage.OnDrawCanvasCallback, @NonNull position: PagePosition)

PDF page created from a Canvas holding all the draw calls.

Parameters

pageSize

Canvas page size in PDF points.

callback

An NewPage.OnDrawCanvasCallback that should be called to perform the drawing on the canvas.

position

Alignment of the drawn content on the target page.