Skip to content

Instantly share code, notes, and snippets.

@conholdate-gists
Last active April 7, 2021 05:41
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 conholdate-gists/9748954ecb8a030999ccf7862c2d28ec to your computer and use it in GitHub Desktop.
Save conholdate-gists/9748954ecb8a030999ccf7862c2d28ec to your computer and use it in GitHub Desktop.
Render Visio supported VSSD, VSDX and VSTX files in HTML, PDF and Image formats using GroupDocs.Viewer for Java API
Render Visio Files in other formats using Java
1. Render Visio (.vsdx) to JPG
2. Render Visio (.vsdx) to PNG
3. Render Visio (.vstx) to PDF
4. Render Visio (.vssx) to HTML
try (Viewer viewer = new Viewer("C:\\Files\\sample_network.vsdx")) {
JpgViewOptions jpgOptions = new JpgViewOptions("C:\\Files\\Output\\output.jpg");
viewer.view(jpgOptions);
}
try (Viewer viewer = new Viewer("C:\\Files\\sample_block.vsdx")){
PngViewOptions options = new PngViewOptions("C:\\Files\\Output\\output.png");
viewer.view(options);
}
try (Viewer viewer = new Viewer("C:\\Files\\sample.vssx")) {
HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("C:\\Files\\Output\\output.html");
viewer.view(options);
}
try (Viewer viewer = new Viewer("C:\\Files\\sample_organization.vstx")){
PdfViewOptions options = new PdfViewOptions("C:\\Files\\Output\\output.pdf");
viewer.view(options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment