Draw.io Download a Copy of Diagram
Export a diagram to various file formats Print
Created by: David Benson
Modified on: Wed, 16 Dec, 2020 at 6:58 PM
You can export your diagrams to various types of images, files of different types, and even encode your diagram into a URL. The type of file that you choose to export to will depend on how you want to use it.
- .drawio and .xml save file formats contain your full diagram, and can be opened in diagrams.net or draw.io.
- .png, .svg and .jpeg are image file formats that you can use in documents, presentation slides or on web pages.
- .html creates HTML code which embeds your diagram on a web page.
- .pdf generates a PDF document.
Compare embed and export formats and their requirements
Export your diagram to an image
You can export the current drawing canvas to an image: PNG, JPEG or SVG. JPEG are most commonly used in web pages. PNG and SVG images are scalable (resizeable) and work well in documents and presentation slides.
Tip: When you export to a PNG or SVG image, you can choose to embed your diagram. When someone imports the image back into diagrams.net, they will be able to see your full diagram.
- Select File > Export as then choose the image format you want to generate - PNG, JPEG, or SVG.
- Each image format will offer you slightly different options, see below for details. Select the options you want, then click Export.
Export as a PNG
PNGs are used in web pages, documents and presentation slides.
- Change the PNG export options to suit your requirements.
- Enable the Selection only checkbox to export just the selected shapes and connectors
- Ensure Include a copy of my diagram is enabled to be able to open your diagram and edit it when you import the PNG file to diagrams.net.
Export as a JPEG
JPEG image files cannot contain your diagram data - only an image version of the page you are exporting.
- Change the JPEG export options to suit your requirements.
- If you only want to export the shapes and connectors that are currently selected, enable the Selection only checkbox.
Export as a SVG
SVG images can include your diagram data, as well as any links you've added to shapes.
- Choose the SVG export settings to suit your requirements.
- To be able to open and edit your diagram, keep the Include a copy of my diagram checkbox enabled.
- By default Links will open following the viewer's browser preferences. Select a different behaviour if you want links to always open in a new tab or a new browser window.
Export to a PDF file
When you export your diagram to a PDF file, you can include a copy of your diagram data, so that when you drop that file onto the diagrams.net editor, it will open your diagram for editing.
Learn more about exporting to PDF files
- Select File > Export As > PDF.
- Change the PDF export settings to suit your requirements, then click Export.
Export to a VSDX file
- Select File > Export As > VSDX (beta).
- Enter a Filename, then click on one of the save locations, or click Download to save the .vsdx file to your device.
Depending on your browser, you may be prompted to open it with a default program, or simply save the file.
Note: Images in your diagram, such as clipart, may not be embedded in the .vsdxfile.
Export to HTML
You can embed a diagram in a web page or in any online platform that can render HTML.
Diagrams exported to HTML files/code are rendered in the diagrams.net viewer by calling a JavaScript hosted on the diagrams.net server. You'll need a working internet connection for the diagrams to be displayed properly.
- Select File > Export as > HTML.
- Change the HTML export settings to suit your requirements, then click Export.
- Choose where you want to save the HTML file.
Learn more about exporting to HTML and embedding your diagram on a web page
Export to XML
- Select File > Export as > XML.
- Change the XML export settings to suit your requirements, then click Export.
- Enter a Filename, then click on one of the save locations, or click Download to save the XML file to your device.
Depending on your browser, you may be prompted to open it with a default program, or simply save the file.
Export your diagram as a URL
When exporting your diagram to a URL, the diagram data is encoded in the link and it is not stored as a file anywhere.
- Select File > Export as > URL.
- Change the URL export settings to suit your requirements, then click Create.
- Copy the URL to share it by email or chat, or click on the Facebook button to add the link to a new post in a new browser tab. Click on Preview to open the link in a new tab. Click Close to return to the diagram editor.
Export using the advanced options
- Select File > Export as > Advancedto see some additional export options that can be applied to PDF and image files. Depending on the Formatyou choose, some options may be disabled.
- Enter a Filename and select the export Format from the drop down list.
- Change the Zoom percentage, set a Width and Height for the resulting image/PDF file.
- Change the DPI setting to output a higher quality image.
- Set a Transparent background and change the Border Width.
- Click Export to create a file of the format you chose, then select a location to save the file.
Did you find it helpful? Yes No
Send feedbackDraw.io Download a Copy of Diagram
Source: https://drawio.freshdesk.com/support/solutions/articles/16000067785-export-a-diagram-to-various-file-formats