Converti una forma Visio in HTML

** Converti una forma visio in html**

Il metodo ToHTML esposto daForma class può essere utilizzato per convertire in html.

Il codice seguente mostra come:

  1. Carica un campione diagram.
  2. ottenere una pagina particolare.
  3. ottenere una forma particolare.
  4. convertire la forma in html.

Forma in Html

Usa il seguente codice nella tua applicazione .net per convertire una forma visio in html.

// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Shapes();
// Call a Diagram class constructor to load the VSDX diagram
Diagram diagram = new Diagram(dataDir + "ShapeToHtml.vsdx");
// Get a particular page
Page page = diagram.Pages[0];
// Get a particular shape
Shape shape = page.Shapes[0];
// Shape to HTML
Aspose.Diagram.Saving.HTMLSaveOptions hs = new Aspose.Diagram.Saving.HTMLSaveOptions();
shape.ToHTML("out.htm", hs);