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

Free Support Forum - aspose.com

Error Saving PPT as PDF / Streaming PDF code

Two questions… Is there sample code to get a PPT that I save as a PDF to “stream” so I get a “save as” box?

Secondly, when I try and save slides as PDF I get the following error - how do I fix this:

Server Error in ‘/’ Application.

        <h2> <i>Inheritance security rules violated while overriding

member:
‘..GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)’. Security accessibility
of the overriding method must match the security accessibility of the
method being overriden.

        <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

        <b> Description: </b>An unhandled exception occurred during 

the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.

        <br><br>

        <b> Exception Details: </b>System.TypeLoadException: 

Inheritance security rules violated while overriding member:
‘..GetObjectData(System.Runtime.Serialization.SerializationInfo,
System.Runtime.Serialization.StreamingContext)’. Security accessibility
of the overriding method must match the security accessibility of the
method being overriden.

        <b>Source Error:</b> <br><br>

        <table bgcolor="#ffffcc" width="100%">
           <tbody><tr>
              <td>
                  <code></code><pre>

Line 88: pres.Save(“d:\demo.pdf”, Aspose.Slides.Export.SaveFormat.Pdf);


Hi Julie,

I have shared the sample project code for converting PPT to PDF using streams. Please share, if you still feel any issue.

Thanks and Regards,

Thank you for the sample code, but it appears that it is for exporting PPT and not PDF.

PPT export works wonderfully, but I am having problems converting the PPT to PDF.

Thanks!

Hi Julie,

Please use the code snippet attached to export PPT to PDF. I have already shared the similar code snippet in other forum thread as well. Please share, if you still face any issue in this regard.

Thanks and Regards,