Convert Visio to PDF PNG JPEG SVG HTML XAML in Node.Js

In my previous post, I demonstrated how to create MS Visio diagrams from scratch in Node.js. In this article, I’ll show you how to use Aspose.Diagram to export or convert Visio diagrams to popular file formats in Node.js applications.

Converting Visio diagrams is useful in many scenarios. You can convert a diagram to HTML or JPEG/PNG to display it on a web page or in a Visio viewer. Visio to PDF conversion removes the need for dedicated viewing software. Aspose.Diagram provides high‑quality conversion for these cases.

Node.js Visio Converter API - Installation

You can install Aspose.Diagram into your Node.js application using the following npm command.

npm install aspose.diagram --save

Convert Visio to PDF in Node.js

PDF is a platform‑independent format that keeps document content stable across environments. Converting a Visio diagram to PDF ensures reliable sharing without requiring special software. Follow these steps to convert a Visio diagram to PDF with Aspose.Diagram.

The code sample below converts a Visio VSDX to PDF in Node.js.

VSDX File

VSDX to PDF

PDF File

Visio to PDF in Node.js

Convert Visio to PNG/JPEG/Other Images in Node.js

Converting Visio diagrams to images is useful for thumbnails or viewer displays. Aspose.Diagram supports these image formats:

  • PNG
  • JPEG
  • TIFF
  • BMP
  • EMF

Steps to convert Visio diagrams to images:

The code sample below converts a Visio VSDX to PNG in Node.js.

Export Visio Diagrams to SVG in Node.js

You can convert a Visio diagram to SVG with just a few lines of code.

The code sample below converts a Visio VSDX to SVG in Node.js.

Convert Visio Diagram to HTML in Node.js

Aspose.Diagram can also convert a Visio diagram into an HTML document with a navigation sidebar.

The code sample below converts a Visio VSDX to HTML in Node.js.

Visio to HTML

Visio to HTML Node.js

Convert Visio to XAML in Node.js

You can also convert a Visio diagram to XAML, Microsoft’s Extensible Application Markup Language.

The code sample below converts a Visio VSDX to XAML in Node.js.

Conclusion

We have shown how to convert MS Visio diagrams to PDF, PNG, JPEG, SVG, HTML, and XAML in Node.js using Aspose.Diagram. For more details, see the documentation.

Related Article