We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issues working with VSDX (working with VSD)

I am having issues with Aspose.Diagram in Java reading from VSDX file to export to PDF and PNG.


If I manually convert the VSDX to VSD using MS Visio (Save as older version) and then use the same script in Aspose.Diagram it exports to PDF and PNG correctly.

Unfortunately my application requires the VSDX version of Visio so I need to resolve this by dealing directly with VSDX.

Issues encountered
PDF
1. Error when opening the file (“An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem”)
2. The majority of the shapes in the diagram are missing

PNG
1. Horizontal lines are missing (the arrows at the end of the lines are visible)
2. Many of the shapes are missing (circles which the above lines snap to in Visio)

Code being used
import com.aspose.diagram.*;

public class ExportDiagramToPDF
{
public static void main(String[] args) throws Exception
{
License license = new License();
license.setLicense(“Aspose.Diagram.lic”);

System.out.println(“Started run”);
// The path to the documents directory.
String dataDir = “c:/projects/visiotest/”;

// Call the diagram constructor to load diagram from a VSD file
Diagram diagram = new Diagram(dataDir+ “Drawing1.vsdx”);
// Diagram diagram = new Diagram(dataDir+ “Drawing1.vsd”); ** If I replace the above line with this and manually change the version in Visio it exports correctly

// Save outputs
diagram.save(dataDir+ “Diagram.pdf”, SaveFileFormat.PDF);

ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.setResolution(300);
diagram.save(dataDir+ “Diagram.png”, options);

System.out.println(“Process Completed Successfuly”);

}
}

Attachments
I have the Input VSDX, and incorrectly generated output PNG and PDF
I have also attached the Input VSD (created manually in Visio) and you will see the correct output PNG and PDF with that.




Hi Broussard,


Thank you for contacting support. We managed to replicate the issues said. These issues have been logged as follows:

DIAGRAMJAVA-50103 - VSDX to PDF export, an error message while opening output PDF file
DIAGRAMJAVA-50104 - VSDX to PDF export, the shapes are missing from output PDF file
DIAGRAMJAVA-50105 - VSDX to PNG export, horizontal lines are missing
DIAGRAMJAVA-50106 - VSDX to PNG export, circular shapes are missing

Your request has also been linked to these issues. We’ll keep you informed regarding any available updates. We’re sorry the inconvenience caused.

Hi Broussard,

Thank you for being patient. We have a good news for you that the issue ids DIAGRAMJAVA-50103, DIAGRAMJAVA-50104, DIAGRAMJAVA-50105 and DIAGRAMJAVA-50106 have now been resolved. If there is no issue in the QA phase, then these fixes will be included in the next version of Aspose.Diagram for Java 3.0.0. Its release date is not final yet. We'll inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as DIAGRAMJAVA-50103;DIAGRAMJAVA-50104;DIAGRAMJAVA-50105;DIAGRAMJAVA-50106) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.