Hello. We have discovered an issue when converting certain visio (vsdx) files to HTML.
We have the following testing document which reproduces the issue
on both [25.5.0] and [25.10.0] versions of Aspose.Diagram visioFile.7z (77.1 KB)
In this file, on page 1, top left corner, there are some numbers, each have a unique styling applied:
One is bold, one is in italics, one is underlined, etc image.png (11.4 KB)
Using the following code, we generated the HTML from it:
var diagramFilePath = “visioFile.vsdx”;
var diagramFileSavePath = “visioToHtml.html”;
Diagram diagram = new Diagram(diagramFilePath);
var options = new HTMLSaveOptions
{
IsExportComments = false,
ExportHiddenPage = false
};
try
{
using (diagram)
diagram.Save(diagramFileSavePath, options);
}
When the HTML is generated, those numbers I mentioned above do NOT get the styling from the original visio file: image.png (24.1 KB)
or, at least not all of the stylings, i see that subscript was applied to “111” but nothing else.
I also tried using SVGSaveOptions to see if that’s better but no stylings are applied with that as well.
Anything else we could try to make it work?
Thank you
Summary
When converting a .vsdx file to HTML or SVG with Aspose.Diagram, character‑level formatting (bold, italic, underline, etc.) may be missing in the output. This is often because the export options that control character‑style preservation are not enabled or the library version being used does not support them.
Why it happens
The default HTMLSaveOptions/SVGSaveOptions export a limited set of text attributes. Character‑level styles are omitted unless the exporter is instructed to keep them.
Some older releases of Aspose.Diagram for .NET did not expose a switch for exporting character styles, so the output contains only the plain text (sub‑script may still appear because it is treated as a separate run‑level property).
If the formatting in the Visio file is applied via a theme or master shape rather than as direct formatting, the exporter may ignore those styles.
If the version is older than the latest release, upgrade to the newest Aspose.Diagram for .NET build. Recent versions include a property to export character styles.
Enable character‑style export (available in recent versions)
var diagram = new Aspose.Diagram.Diagram("visioFile.vsdx");
var htmlOptions = new Aspose.Diagram.HTMLSaveOptions
{
ExportHiddenPage = false,
ExportComments = false,
ExportCharacterStyles = true, // <-- enable character formatting
ExportEmbeddedFonts = true // optional, keeps original fonts
};
diagram.Save("visioToHtml.html", htmlOptions);
For SVG the same flag can be used:
var svgOptions = new Aspose.Diagram.SVGSaveOptions
{
ExportCharacterStyles = true
};
diagram.Save("visioToSvg.svg", svgOptions);
Apply direct formatting in Visio
Open the .vsdx file in Visio.
Use the Font dialog (or the ribbon) to apply Bold, Italic, Underline, etc., directly to the text you need to preserve. Avoid relying solely on theme‑based or master‑shape formatting, as those may not be exported.
Save the file and re‑run the conversion.
Verify the generated output
Open the resulting HTML or SVG in a text editor.
Look for <span style="font-weight:bold;"> (HTML) or <tspan font-weight="bold"> (SVG) around the affected text.
If the tags are present but the browser still shows plain text, check for external CSS that could be overriding the inline styles (e.g., a global span { font-weight: normal; }).
Optional – embed fonts
If the target environment may not have the original Visio fonts, keep ExportEmbeddedFonts = true for HTML to embed the font data, ensuring consistent rendering.
If the problem persists
Gather the following information and send it to Aspose support:
Exact Aspose.Diagram for .NET version.
A minimal .vsdx file that reproduces the issue.
The generated HTML/SVG files.
Any custom CSS applied to the output.
This will help the support team determine whether a product‑specific bug exists.
Quick checklist
Use the latest Aspose.Diagram for .NET version.
Set ExportCharacterStyles = true (and ExportEmbeddedFonts = true for HTML if needed).
Apply direct character formatting in Visio.
Confirm the output contains the expected <span>/<tspan> elements with style attributes.
Ensure no external CSS overrides those inline styles.
Following these steps should restore bold, italic, underline, and other character styles in the HTML or SVG output.
Note: The answer is based on the current Aspose.Diagram documentation and typical behaviour of the library. If your version does not expose ExportCharacterStyles, upgrading to the latest release is required.
I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.
these do not exist in the latest Aspose.Diagram library.
Our app targets net8 and net47, and we are using Aspose.Diagram [25.5.0] and [25.10.0] to reproduce this issue, so it happens in latest version too.
As for minimal document, the attached document above is the best i can do with that particular document, as i cannot modify it in Microsoft Visio
@IBurzoEvoRWS
Thanks for the template file and screenshots.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file. I found the The text’s italics and underlining formatting have been lost. We need to evaluate your issue/requirements in detail.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): DIAGRAMNET-53838
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.