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

Free Support Forum - aspose.com

Trying to save document as XHTML transitional throws exception

Hi,

We are trying to save the attached document, a.docx, as XHTML transitional. Unfortunately, the following code throws exception:

var document = new Document(@“a.docx”);
document.Save(@“b.docx”, new HtmlSaveOptions
{
ExportImagesAsBase64 = true,
ExportXhtmlTransitional = true,
});

Also, this code throws the same exception:

var document = new Document(@“a.docx”);
document.Save(@“b.docx”, new HtmlSaveOptions
{
ImagesFolder = “folder”,
ExportXhtmlTransitional = true,
});

The exception we are receiving in both cases is the following:
System.OverflowException was unhandled
at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
at System.Drawing.Graphics.FillPath(Brush brush, GraphicsPath path)
at x85732faf56f7825d.x3a15c7024016ce52.VisitPathEnd(xab391c46ff9a0a38 path)
at x1c8faa688b1f0b0c.xab391c46ff9a0a38.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept(xf51865b83a7a0b3b visitor)
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept(xf51865b83a7a0b3b visitor)
at x85732faf56f7825d.x3a15c7024016ce52.xe406325e56f74b46(x4fdf549af9de6b97 xda5bf54deb817e37, Graphics x41347a961b838962)
at x077e797660ceec8d.x0a376fc3a80043f7.x30c8ca6bc9c65a2b(x3dacf8cbb5aec9f0 xf15f3ed674f04b8e)
at x077e797660ceec8d.x0a376fc3a80043f7.x2917885cd0f8f9ab()
at x077e797660ceec8d.x0a376fc3a80043f7.xba11e5f1f6087f94(Stream xcf18e5243f8d5fd3)
at x077e797660ceec8d.x0a376fc3a80043f7.x53c5cdce403a6243(x4fdf549af9de6b97 xdb732bbde4502b4e, SizeF xa03db8a5ee939042, Stream xcf18e5243f8d5fd3, ImageSaveOptions xc27f01f21f67608c)
at Aspose.Words.Rendering.ShapeRenderer.Save(Stream stream, ImageSaveOptions saveOptions)
at x13cd31bb39e0b7ea.xcc0b5baa75272714.x1056c53fc7967a3d(DrawingML xb3c5925d90ebc5f0)
at x13cd31bb39e0b7ea.xcc0b5baa75272714.VisitDrawingML(DrawingML drawingML)
at Aspose.Words.Drawing.DrawingML.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Body.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Section.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.CompositeNode.xf7ae36cd24e0b11c(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Document.Accept(DocumentVisitor visitor)
at x13cd31bb39e0b7ea.xcc0b5baa75272714.x18dfca7c5fd2402f(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)

The Aspose.Words version we are using is 14.1.0.0.

Thank you,
Bogdan Ungureanu

Hi Mihai,

Thanks for your inquiry.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9901. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-9901) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.