Hello, we are using 21.2 version (experienced the same problem with 20.8 too),
Extracting the first page of sample vsd using the following code:
using (var viewer = new Viewer("sample.vsd"))
{
var options = HtmlViewOptions.ForEmbeddedResources("p1.html");
viewer.View(options, 1);
}
I downloaded sample vsd from here https://www.microsoft.com/en-us/download/details.aspx?id=28709
It opens fine in ultra office, but converted html does not look right (both included in attached zip file):
vsd_problem.png (43.2 KB)
vsd_problem.zip (264.6 KB)
@eugenekr
Thank you for sharing the details and attaching the source and output files. We’re looking into this issue and will let you know in case of any updates.
Hi @eugenekr
We could reproduce this issue at our end. It’s been logged in our internal issue tracking system with ID VIEWERNET-3101.
For now, you could use this workaround.
using (var viewer = new Viewer("sample.vsd"))
{
var options = HtmlViewOptions.ForEmbeddedResources(
(pageNumber) => new MemoryStream(),
(pageNumber, pageStream) => {
var bytes = ((MemoryStream)pageStream).ToArray();
var html = Encoding.UTF8.GetString(bytes);
var updated = html.Replace("<title />", string.Empty);
File.WriteAllText("p1.html", updated);
});
viewer.View(options, 1);
}
1 Like
@eugenekr this issue will be fixed in the current 21.3 release.
1 Like
@eugenekr
GroupDocs.Viewer for .NET v21.3 that includes fix for this issue has been published. You can find the new version at
Have a nice day!
It is working in version 21.5, thanks!