Exporting Diagram
You can easily export a diagram into the PDF or PNG format via the related pdf()/png() methods of the Export object:
To adjust the export settings, pass an object with configuration options to the necessary method.
Check the list of available settings:
Exporting styles
By default, all css styles included to the Diagram page are sent to the export service when exporting the diagram. As a result, the size of the request increases that can cause the request to fail.
The library allows you:
- to prevent all styles from being sent to the export service via setting the exportStyles configuration property of the Diagram object to false:
const diagram = new dhx.Diagram("diagram_container", {
exportStyles: false
});
- to define a set of styles that you want to be exported via setting absolute paths to the desired styles to the exportStyles array:
note
Note, that you must use only absolute paths not relative ones.