Hello,
I have been playing with the above code/objects and I'm hitting a wall: It seems I can change the size of the paper, but the contents is always sized for Letter paper.
I want to print on Legal paper, Landscape view.
Here's the code that I'm using (which doesn't work)... Please help!
var diagram = fcApplet.getDiagramView().getDiagram();
var scriptHelper = sbApplet.getScriptHelper();
var paper = scriptHelper.createPaper();
var pageformat = scriptHelper.createPageFormat();
paper.setSize(612.0, 1008.0); //8.5*14 in 1/72nds of inches
paper.setImageableArea(0.0, 0.0, 612.0, 1008.0);
pageformat.setPaper(paper);
pageformat.setOrientation(pageformat.LANDSCAPE);
var po = fcApplet.getDiagramView().getPrintOptions();
po.setEnableFitToPage(true);
po.setDocumentName('');
po.setHeaderFormat('');
fcApplet.getDiagramView().print(pageformat, null);