Print a Go js Diagram

Hello,

I am facing a challenge while printing a GOJS Diagram.
I am using this code flow to Print:-

var db = diagram.documentBounds.copy();
var boundswidth = db.width;
var boundsheight = db.height;
var svg = diagram.makeImage({size : new go.Size(boundswidth,boundsheight)});
var newTab = window.open();
newTab.document.body.appendChild(svg);
return ;

But while printing some part of the page is cut down.
So if it comes in more than 1 page then I don’t have an issue.

I am attaching a screenshot of the Image, so please suggest me how to print the complete page.

If you really want to create bitmap images, please read GoJS Printing -- Northwoods Software.

But I suggest that you create SVG by calling Diagram.makeSvg instead.

Hello,

I have tried this one but it does not work for me.
Please provide me another way to resolve it.

Thanks
Shivam Varshney

You have to make sure each image is small enough so that it will not be clipped when printing. That is why GoJS Printing -- Northwoods Software uses a double loop to make sure the whole diagram document area is chopped into pieces that fit into a page.