VML node- exception on openning a pptx file

Hi there!

Sometimes when I try to open a pptx file, I am getting this exception. Any idea why?

Aspose.Slides.Pptx.PresentationEx pres = new Aspose.Slides.Pptx.PresentationEx(fileName);

Aspose.Slides.PptReadException: Error reading "/ppt/drawings/vmlDrawing1.vml" xml part ---> Aspose.Slides.PptReadException: Invalid VML node name name.
at d5.a(ai A_0)
at d5.c(ai A_0)
at b8.e()
at q2.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2, Boolean A_3)
--- End of inner exception stack trace ---
at q2.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2, Boolean A_3)
at q2.a()
at q2..ctor(Stream A_0)
at Aspose.Slides.Pptx.PresentationEx..ctor(String file)

Hi Anita,

Can you please provide the PPTX for investigation?

Hi,

here is a sample pptx that gives me this exception. It has no content really. So I am guessing somthing to do with the master slide format?

Anita

Hi Anita,

Please find attached the modified pptx. It will be read correctly.

So what was the problem?

I don't want to use the modified pptx. I have several ppts in 2007 format which my application should be able to read. And currently it can't since Aspose pptx read throws an exception.

So rather than modifying each pptx, I would like to fix the library.

For now, I modified the code to use Microsoft's Interop service directly and it works!

Please let me know if you need any other info for fixing this issue.

Thanks,

Anita

Hi Anita,

I did nothing special with this pptx. I just deleted the exisitng slide and created a new slide. I don't know how did you create the slide in the presentation provided by you, because there is no problem with the master / layout slides.

I have attached one mroe slide from another pptx..

again, these files are read without any problem by Microsoft's Interop library.

So there must be some issue with Aspose library when it tries to read, it throws an exception. and now that I am using the latest 4.0.1, Aspose error says, not a 2007 format. Which is strange, because the file is a 2007 pptx.

11/24/2009 2:24:35 PM FAIL sample2.pptx

Aspose.Slides.UnsupportedFormatException: Not a Microsoft PowerPoint 2007 presen
tation. ---> Aspose.Slides.PptReadException: Error reading "/ppt/drawings/vmlDra
wing1.vml" xml part ---> Aspose.Slides.PptReadException: Invalid VML node name n
ame.
at d3.a(ag A_0)
at d3.c(ag A_0)
at b8.e()
at q5.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2, Boolean A_3)
--- End of inner exception stack trace ---
at q5.a(XmlDocument A_0, String A_1, XmlSchemaCollection A_2, Boolean A_3)
at q5.a()
at q5..ctor(Stream A_0)
--- End of inner exception stack trace ---
at q5..ctor(Stream A_0)
at Aspose.Slides.Pptx.PresentationEx..ctor(String file)
at SeekASlide.Server.SlideImaging.PPTImager.Run2(Object filename)
at SeekASlide.Server.Indexer.IndexerQueue.addDocument(FileInfo fi)
at SeekASlide.Server.Indexer.IndexerQueue.updateDocument(String path)
at SeekASlide.Server.Indexer.IndexerQueue.Run()

perhaps the problem is not in master slide format. there must be some object in the original slide content, which Aspose is not able to read.

Hi Anita,

UnSupportedFormatException is raised, if Aspose.Slides fails to read the presentation format. Definitely, there is some problem with the way you are creating the slide. Anyways, I have created an issue with issue id 12054 for investigation. Our development team will investigate the pptx provided by you and you will be informed about the proceedings.

I used this code for reading the same file with Microsoft interop lib, which works.

//temprorary fix, works

PowerPoint.ApplicationClass oApp = new PowerPoint.ApplicationClass();

PowerPoint.Presentation oDoc1 = oApp.Presentations.Open(fileName, MsoTriState.msoTrue, MsoTriState.msoTrue, MsoTriState.msoFalse);

oDoc1.SaveAs( tempImage, Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsPNG, MsoTriState.msoTrue);

//Aspose, fails

//Aspose.Slides.Pptx.PresentationEx pres = new Aspose.Slides.Pptx.PresentationEx(fileName);

The issues you have found earlier (filed as 12054) have been fixed in this update.


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan