So I currently make an SVG of my Diagram in the following fashion.
I make a call to generateImages as you have defined here: GoJS Printing -- Northwoods Software
However, instead of calling Diagram.makeImage I call Diagram.makeSvg like so:
for (var i = 0; i < boundsheight; i += imgHeight) {
for (var j = 0; j < boundswidth; j += imgWidth) {
img = confSheetDiagramRef.makeSvg({
scale: 1,
details: 1,
position: new go.Point(p.x + j, p.y + i),
size: new go.Size(imgWidth, imgHeight)
});
img.className = 'images';
imgDiv.appendChild(img);
imgDiv.appendChild(document.createElement('br'));
}
}
Now for some reason, every single element of my Diagram (all of which are Nodes, with different sub parts), are perfectly copied in the resulting Svg regarding their height and width and x,y coordinates.
The nodes that I have, which contain a subpart Picture, however, are not copied properly. That is, they appear in the resulting SVG at a much smaller dimension.
Here is the Node template for the Node which contains a Picture, which is appearing in the SVG smaller than it appears in the Diagram
var imagetemplate = GO(go.Node, "Horizontal",
new go.Binding("location", "shapePosition"),
new go.Binding("key", "key"),
GO(go.Picture,
new go.Binding("angle", "rotation"),
new go.Binding("width", "width"),
new go.Binding("source", "text"),
new go.Binding("height", "height"),
new go.Binding("maxSize", "bounds")
)
)
I imagine it is because the width and height of the Node is NAN so then it hits the part of generateImages which gives the width and height an arbitrary value?

