canvasGenerateFrom

Description

Converts a file data to a canvas, canvas are mainly used for printing.

Platform Supported

  • Web

  • Mobile

Input / Parameter

NameDescriptionData TypeDefaultOptionsRequired

type

The data type of the file to be converted, basically what is the data type of the 'value'.

Text

base64

base64

No

value

The data of the file to be converted.

Any

-

-

Yes

fileType

The file type of the file to be converted, basically what is the file type of the 'value'.

Text

image

image, pdf

No

documentSize

If the 'fileType' is 'pdf', this parameter is used to scale the size appropriately.

Text or Number

-

a4, {Any Number}

No

Output

DescriptionOutput Type

Returns 'true' or 'false', based on the execution status.

Boolean

Callback

callback

The function to be executed when the canvas is generated successfully.

DescriptionOutput Type

Returns the html canvas.

errCallback

The function to be executed when the canvas is not generated.

DescriptionOutput Type

Returns the error.

Text/Object

Last updated