Showing Ruler in makeSVG


My team has added the ruler from Diagram with Rulers to our diagram panel and we are trying to have it remain in view when we export/print the document via the makeSvg function. However, the ruler does not render in the makeSvg output. We originally thought it may have to do with layering, but we’re still seeing the grid in the output, and the ruler shares the same layer as the grid so we’re not sure where to look next. Any suggestions?

The ruler can be seen here in the normal diagram view:

However in the print preview, which shows the output of makeSvg, it is missing:

The code snippet calling makeSvg:

var img = this.diagram.makeSvg({
      background: this.diagram.model.modelData.backgroundColor,
      showGrid: true


We can reproduce the problem. Thanks for pointing it out. We’ll fix this for the next release, which may take a few days.

1 Like

If you add

showTemporary: true

to your makeSvg options, what happens?

Nice it looks like showTemporary does work, we’ll just have to be sure to unselect any nodes before we execute the print functions so we don’t have any leftover selection adornments.

Thanks again!