Hi Walter,
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:-
Here, the issues I got are
- It starts from page 2 if content if large but if content is small then it starts from page 1.
- Some text has been cut down from the right tree (you can check 5th and 6th line from right tree).
Can you please suggest how I can achieve the following:-
- It always starts from page 1.
- Complete text will appear.
- Always appears in the center of the page.
- How I can set the page size for the printing (standard size for Landscape & Portrait mode)?
Thank you for your support.