Creating image with large width and height?

var diaWidth=63431, diaHeight=1010;
var test= diagram.makeImageData({
background: ‘white’,
scale: 1,
type: “image/jpeg”,
maxSize: new go.Size(diaWidth, diaHeight)

Above is the code I am used to set the image width and height but still its not working for me.
Could give suggestion for me how to resolve this.

That might be too large an image. Search the web for more information, such as

Reduce the scale. Or call Diagram.makeSvg instead.

If I reduce the scale size then image quality will be low which is not acceptable because the we cannot read the content inside the image ,

and If I try to create image using makeSvg method I am getting the below Error

Failed to execute ‘drawImage’ on ‘CanvasRenderingContext2D’: The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)'

Could you tell us how to reproduce this problem?

How is what you are doing different from what the Flow Chart sample ( ) demonstrates with the “Render as SVG” button?