Unable to download complete diagram as image

Hi Walter,
i am trying to export a huge diagram.
actual diagram:

when i export a diagram ports are missing


below is the code i am using

  img = this.diagram.makeImageData({
                          background: "white",
                          scale: 0.8,
                          maxSize: new go.Size(Infinity, Infinity)

and in animation finish event i have been using ‘centerrect’ for a node.
what i observed is, if i zoom out the diagram. i can get the whole diagram.

  1. if i use zoomtofit image is not clear.
    what is the main reason to cause this. and what might be the actual solution.

What is the Diagram.documentBounds?

Which browser are you using, and do you get the same results in different browsers?

hi Walter,

please find the documentBounds and issue is replicating in all browsers.
A {x: -59, y: -34410, width: 6570, height: 51362.55166015625, D: true}

I hope you understand that such an image is probably occupying about 1.3GB in memory. Is that what you want? I think the browsers have limits on how large an image they can reliably draw to.

This is why it’s unwise to specify a maxSize of Infinity x Infinity.

in browser it is showing good. when i am trying to get it as image, unable to do it. is there any way, by using less memory i should get image. and how can i define maxSize for this type of images and when i decrease scaling to 0.2, i am able to download it. but it is not much clear.

Either split it up into multiple images, or render to SVG rather than to a raster image.