Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active June 30, 2022 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/abc013f750408df9d39f9e5478c500ba to your computer and use it in GitHub Desktop.
Save aspose-com-gists/abc013f750408df9d39f9e5478c500ba to your computer and use it in GitHub Desktop.
Convert VSDM Visio Diagram File to PDF in Java | VSDM Converter
// Load input VSDM file
Diagram diagram = new Diagram("input.vsdm");
// Set page size for the output PDF
PageSize size = new PageSize(PaperSizeFormat.A_4);
// Set different options for rendering VSDM diagram to PDF
PdfSaveOptions options = new PdfSaveOptions();
options.setPageSize(size);
options.setExportComments(true);
// Save output PDF file
diagram.save("output.pdf", options);
// Load input VSDM file
Diagram diagram = new Diagram("input.vsdm");
// Save output PDF file
diagram.save("output.pdf", SaveFileFormat.PDF);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment