Paper Setup and print setup

Hi,
I want to know that how can I provide options regarding the paper setup (page size and orientation) and print setup before the browsers default print page appears when i try to print the diagram using Diagram.makeImage() function .

As far as I know, in JavaScript one cannot know which printer and what page and print settings the user has chosen until the printing process has started. There are no standard callbacks during the printing process. You can only guide the printing process with CSS @media print.

But you could give the user printing options and then create “pages” of the appropriate size using Diagram.makeImage or Diagram.makeSvg. However the user could still choose a printer or page settings (such as landscape or margin) that would be inconvenient for the previously generated page content.

3 posts were split to a new topic: Losing link routes after saving and loading