How to print large image

generatePDF() {
// var myDiagram: go.Diagram;
// sanitize input
var width = this.diagrams.documentBounds.width;
var height = this.diagrams.documentBounds.height;
console.log(width);
console.log(height);

    if (isNaN(width)) width = 100;
    if (isNaN(height)) height = 100;
    // Give a minimum size of 50x50
    width = Math.max(width, 50);
    height = Math.max(height, 50);
    var imgDiv = document.getElementById('myImages');
    console.log(imgDiv)
    // imgDiv.innerHTML = ''; // clear out the old images, if any
    var db = this.diagrams.documentBounds.copy();
    var boundswidth = db.width;
    var boundsheight = db.height;
    var imgWidth = width;
    var imgHeight = height;
    var p = db.position.copy();
    //making images
    for (var i = 0; i < boundsheight; i += imgHeight) {
        var img: any
        for (var j = 0; j < boundswidth; j += imgWidth) {
            img = this.diagrams.makeImage({
                scale: 0.5,
                type: "image/png",
                background: "white",
                position: new go.Point(p.x + j, p.y + i),
                maxSize: new go.Size(Infinity, Infinity)
            });
        }
    }

I am creating the image in width was 12000 and Height was 7000 , while creating large image my chrome Browser was hanging, Then image also not creating .But in the case i can create a small image ,its was working properly like width was 3000 height was 1000,i am followed this link as per given sample. https://gojs.net/latest/intro/printing.html,If you Dont Mind could you tell me,
How to get print the large images for printing,Thanks Advance.

You really don’t want to do that. Your 12000x7000 raster image takes up about 336 MegaBytes, which is not likely to work on mobile devices.

Try rendering to SVG instead, if you cannot break up the image into smaller ones. http://gojs.net/latest/intro/makingSVG.html

Thank you Walter,While debug in my code this data is not printing in the console .var imgDiv = document.getElementById(‘myImages’); console.log(imgDiv), so the Image data is not creating ,after creating the Image only i can do my diagram as SVG or some different format, its taking so much time then browser also hanging.if image its creating means i can do a Export as a PDF. Thanks in Advance.