NullReferenceException when attempting to open ppt using PresentationEx class

Last post 01-19-2011, 10:35 AM by Mudassir. 3 replies.
Sort Posts: Previous Next
  •  01-18-2011, 9:45 PM 279179

    NullReferenceException when attempting to open ppt using PresentationEx class .NET

    Attachment: Present (inaccessible)

    I am trying to convert presentations in the PPT format to PDF. I am using version 4.4.0.0 of Aspose.Slides to do this. When I try to instantiate the PresentationEx class passing in the Stream for the PPT file I get the following exception & stack trace:

    System.NullReferenceException: Object reference not set to an instance of an object.

    Aspose.Slides.Pptx.ConnectorEx.PptxAfterLoad(IDictionary shapeIdToShape)
    Aspose.Slides.Pptx.GroupShapeEx.PptxAfterLoad(IDictionary shapeIdToShape)
    Aspose.Slides.Pptx.BaseSlideEx.Ppt2003AfterLoad()
    Aspose.Slides.Pptx.PresentationEx.(Stream )
    Aspose.Slides.Pptx.PresentationEx..ctor(Stream stream)

    Code Snippet:

                var presentationEx = new PresentationEx(sourceStream);
                presentationEx.Save(targetStream, SaveFormat.Pdf);

    I have also attached the ppt file for review.

     

    Filed under: Aspose.slides
     
  •  01-19-2011, 12:17 AM 279192 in reply to 279179

    Re: NullReferenceException when attempting to open ppt using PresentationEx class

    Hi Ranjeet,

    I have worked with your presentation and have successfully generated the PDF using Aspose.Slides for .NET 4.4.7. For your kind reference, I have attached the generated presentation as well. Please download the mentioned product version from here.

    Thanks and Regards,


    Mudassir Fayyaz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  01-19-2011, 8:47 AM 279708 in reply to 279192

    Re: NullReferenceException when attempting to open ppt using PresentationEx class .NET

    Mudassir, thank you for the quick response. We are referencing the Slides assembly that is targeting .net 3.5 but in the zip you have supplied I only see assemblies for .net 2.0. Can you provide the .net 3.5 assemblies too?
     
  •  01-19-2011, 10:35 AM 279736 in reply to 279708

    Re: NullReferenceException when attempting to open ppt using PresentationEx class

    Hi Ranjeet,

    Actually, Aspose.Slides for .NET 4.4.7 is intermediate version. The new version of the product has not yet been released and that will contain the dll for .NET 3.5. Moreover, the share .NET 2.0 dll works for all .NET platforms. Meanwhile, you may please rely on the shared dll and later on when the actual product will be released, you can use the .NET 3.5 dll.

    Thanks and Regards,


    Mudassir Fayyaz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
View as RSS news feed in XML