Then I am using this pageHtml to create its PDF for printing. I am getting the following result which showing the extra lines around the node. Please check the sreen:-
The issue of lines around the nodes has been sorted out. Actually, it was due to the background set for the Panel.
I have few concerns on the printing of a diagram while making image and converting into PDF. I have gone through the documentation of the printing.
I have calculated the width and height of the diagram by using actualBounds and set this size to make the image but it created the PDF like this (which is default FIT TO PAGE).
You can see here it is left aligned and rest of the page on the right is completely blank. It should be in the mid. I have used the following code:-
var len = MINLENGTH;
var wdth = MINBREADTH;
myDiagram.findTopLevelGroups().each(function(lane) {
var holder = lane.placeholder;
if (holder !== null) {
var sz = holder.actualBounds;
len = Math.max(len, sz.height);
wdth = wdth + sz.width;
}
});
FinalPrintHeight = len + 100;
FinalPrintWidth = wdth + 400;
var svg = myDiagram.makeImage({size : new go.Size(FinalPrintWidth,FinalPrintHeight)});
pageHtml = ('.panel_heading_strategy_title').html()+(’#header_comment_data_content’).html()+svg.outerHTML+$(’#footer_comment_data_content’).html();
But, when I am not using the Size and use only the scale and I scale it to “2” means only this var svg = myDiagram.makeImage({scale : 2});
Then it gives me the following PDF:-
I’m not sure what you want to do, but perhaps temporarily setting Diagram.fixedBounds would help put empty space on the left or top of the contents of the diagram.