Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a visio 2013 file in java

I want to create a .vsdx file (drawing) using Java. Visio 2013 uses Open Packaging Convention. I don't know from where to start, currently referring this link http://blogs.office.com/2013/01/29/10-tips-for-developers-working-with-the-visio-vsdx-file-format/.

I want to code this program in Eclipse using Java but the above link is explained totally using C# in Visual Studio. I didn't get any Java library for Visio 2013. Can someone help me and give some idea how should I create a .vsdx file in Java which will be supported by Visio 2013?

like image 572
monu Avatar asked Mar 17 '23 07:03

monu


1 Answers

There are some complications you should be aware of:

  1. Visio 2013 file format is specified in an XSD 1.1 schema. This version of XSD is not usable by JAXB, which means you will have to do a lot of manual work to get the data to resolve to Java objects.
  2. Aspose.Diagram has quite a few gaps in its functionality based on the brief evaluation I did on it a few weeks ago.
  3. The OpenXML4J stuff works fairly well for manipulating the OPC container, but there are a couple of conficts when using JAXB together with this (namely, the relationships within the XML documents themselves are not scooped and must be read in a second, straight DOM, pass).

My approach has been to hack the XSD Schema back down to a 1.0 version and using the N attributes of the objects to switch by type. When I have completed my work, I will be happy to share the XSD which would be usable by JAXB.

like image 54
n8n8baby Avatar answered Mar 25 '23 06:03

n8n8baby