SaveToPdf Error actually a SaveToSvg Error


#1

When calling SaveToPdf we get the Error Message at the End of this Posting.

Actually this Error Message points to the deeper Cause for this: not well-formed SVG for the slides.



When we call SaveToSvg and examine the generated *.svg files

it becomes clear that they are not well-formed, since the outermost
tag is not closed before the closing Tag.



System.Xml.XmlException: The ‘g’ start tag on line ‘8’ does not match the end ta

g of ‘svg’. Line 21, position 3.

at System.Xml.XmlTextReader.ParseTag()

at System.Xml.XmlTextReader.ParseBeginTagExpandCharEntities()

at System.Xml.XmlTextReader.Read()

at System.Xml.XmlValidatingReader.ReadWithCollectTextToken()

at System.Xml.XmlValidatingReader.Read()

at System.Xml.XmlLoader.LoadChildren(XmlNode parent)

at System.Xml.XmlLoader.LoadElementNode()

at System.Xml.XmlLoader.LoadCurrentNode()

at System.Xml.XmlLoader.LoadCurrentNode()

at System.Xml.XmlLoader.LoadChildren(XmlNode parent)

at System.Xml.XmlLoader.LoadElementNode()

at System.Xml.XmlLoader.LoadCurrentNode()

at System.Xml.XmlLoader.LoadCurrentNode()

at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)

at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean prese

rveWhitespace)

at System.Xml.XmlDocument.Load(XmlReader reader)

at xf0789b84d5aa419c.x013fa6723041dde1.Load(String url, Stream stream)

at xf0789b84d5aa419c.x013fa6723041dde1.Load(Stream stream)

at xf0789b84d5aa419c.xdbc4775a9e7759d4.set_SrcStream(Stream value)

at x8f567e8eb851a4e9.x252a851992376000.set_SourceStream(Stream value)

at x8f567e8eb851a4e9.x252a851992376000.AddPageToPdf(Stream srcStream)

at Aspose.PowerPoint.Presentation.SaveToPdf(Stream stream)

at Aspose.PowerPoint.Presentation.SaveToPdf(String fname)

at AsposePpt.AsposePptGenerator.SavePresentation(Int32 num_templateSlides) in

y:\lib\csharp\lpa\components\asposeppt\asposeppt\asposeppt.cs:line 510


#2

Please, could you send me ppt where exception was thrown?


#3

Hi,

I'm mheuer's colleague and am attaching a sample .ppt where and the corresponding .svg files (generated with m_pres.SlidesIdea [I].SaveToSVG(filename+i+".svg");) where we observe this problem. For example in presentation7.svg, the first g element has no matching g closing element:

<g text-rendering="geometricPrecision" xml:space="preserve" transform="scale(0.125,0.125)">

Regards, Duane

PS: we are using Aspose Powerpoint for .NET v. 2.2.1.0


#4

We found and fixed this problem. New hot fix will be published at the end of this week.