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

Free Support Forum - aspose.com

Aspose.Slides throw odd exception when loading encrypted odp file

If I try to load encrypted odp file, I get following exception:

"\u000e —> \u0003 : Error reading “/content.xml” part —> System.Xml.XmlException: ‘\u0016’, hexadecimal value 0x16, is an invalid character. Line 1, position 1.\r\n at System.Xml.XmlTextReaderImpl.Throw(Exception e)\r\n at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)\r\n at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()\r\n at System.Xml.XmlTextReaderImpl.ParseDocumentContent()\r\n at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)\r\n at System.Xml.XmlDocument.Load(XmlReader reader)\r\n at System.Xml.XmlDocument.Load(Stream inStream)\r\n at \u0002 .\u0002(\u0005 \u0002)\r\n — End of inner exception stack trace —\r\n at \u0002 .\u0002(\u0005 \u0002)\r\n at \u0002 .\u0002(\u0005 \u0002)\r\n at \u0002 .\u0002(IList`1 \u0002)\r\n at \u0003 …ctor(Stream \u0002)\r\n — End of inner exception stack trace —\r\n at \u0003 …ctor(Stream \u0002)\r\n at <br>u000f .\u0002(Presentation \u0002, Stream \u0003)\r\n at Aspose.Slides.Presentation.\u0005(Stream \u0002)\r\n at Aspose.Slides.Presentation…ctor(Stream stream, LoadOptions loadOptions)\r\n at InDoc.Document.Processing.DocumentHandlers.AsposePresentationHandler.Initialize(Guid documentId, String fileName, Stream fileStream) in C:\Dev\InDoc Document Processing\src\Core\InDoc.Document.Processing\DocumentHandlers\AsposePresentationHandler.cs:line 32\r\n at InDoc.Document.Processing.LoadedDocument.GetHandlerT,H in C:\Dev\InDoc Document Processing\src\Core\InDoc.Document.Processing\LoadedDocument.cs:line 85\r\n at InDoc.Document.Processing.PdfConversion.Converters.PresentationToPdf.Generate(LoadedDocument document, PdfConversionOptions options) in C:\Dev\InDoc Document Processing\src\Core\InDoc.Document.Processing\PdfConversion\Converters\PresentationToPdf.cs:line 17\r\n at InDoc.Document.Processing.PdfConversion.PdfConverter.ConvertToPdf(LoadedDocument document, PdfConversion
Options options) in C:\Dev\InDoc Document Processing\src\Core\InDoc.Document.Processing\PdfConversion\PdfConverter.cs:line 37\r\n at InDoc.Document.Processing.DocumentProcessor.ConvertToPdf(PdfConversionOptions options) in C:\Dev\InDoc Document Processing\src\Core\InDoc.Document.Processing\DocumentProcessor.cs:line 86\r\n at DocumentProcessorSample.Form1.butGetPdf_Click(Object sender, EventArgs e) in C:\Dev\InDoc Document Processing\src\Samples\DocumentProcessorSample\Form1.cs:line 133"
Doing the same with ppt or pptx file throws InvalidPasswordException. Is there any way to detect if odp file if encrypted?

Hi Klemen,

Thank you for posting.

I have observed your comments and like to share with you that the problem appears to be with the file because PowerPoint 2013 also fails to open it (see attached PP.JPG), even after repairing. It seems like you are using some older version of Aspose.Slides for .NET on your end because Aspose.Slides for .NET 16.1.0 throws an exception while loading this corrupt file. However, you may use IsEncrypted property to check if any file is encrypted or not.

I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,

File is not corrupted, it opens correctly in OpenOffice Impress. Powerpoint however does not support encrypted .odp files, which is why you get that message.


Hi Klemen,

Thank you for sharing the information with us.

I have observed your comments and like to share with you that I am getting PptUnsupportedFormat exception while loading it with Aspose.Slides for .NET 16.1.0, and for this issue, a ticket with ID SLIDESNET-37276 has been logged in our issue tracking system to further investigate and resolve the issue.This thread has been linked with the issue so that you may be notified automatically as soon as the issue will be resolved.

We are sorry for your inconvenience,