Attempt by security transparent method while converting pptx to pdf

Following method
public void Save(string fname, Aspose.Slides.Export.SaveFormat format)
Member of Aspose.Slides.Pptx.PresentationEx</pre><pre id="comment_text_0" style="background-color: rgb(255, 255, 255); ">fails with following exception while converting pptx file to pdf</pre><pre id="comment_text_0" style="background-color: rgb(255, 255, 255); ">Attempt by security transparent method ' . .  (System.Drawing.Bitmap)' to

access security critical method
‘System.Runtime.InteropServices.Marshal.Copy(IntPtr, Byte[], Int32, Int32)’
failed.

Assembly ‘Aspose.Slides, Version=5.6.0.0, Culture=neutral,
PublicKeyToken=716fcc553a201e56’ is marked with the
AllowPartiallyTrustedCallersAttribute, and uses the level 2 security
transparency model. Level 2 transparency causes all methods in
AllowPartiallyTrustedCallers assemblies to become security transparent by
default, which may be the cause of this exception.

.Net runtime is 4.0

Hi Dejan,


I have observed the stack trace shared by you. However, in order to further investigate and resolve the issue, I need the source presentation. Please share the source presentation along with information about Aspose.Slides version that you are using to proceed further.

Many Thanks,
Here is relevant source presentation where actual pptx to pdf conversion get performed...
if (extension.Equals(FileDataHelper.FileExtensionPptx))
{
var presentation = new PresentationEx(tempPptFile);
numPages = presentation.Slides.Count;
presentation.Save(pdfGeneratedFile, Aspose.Slides.Export.SaveFormat.Pdf);
}
Pptx input file attached.
Assembly Aspose.Slides, Version=5.6.0.0
.Net runtime is version 4.0

Hi Dejan,


I have worked with the presentation file shared by you using Aspose.Slides for .NET4 5.7.0 and have been able to export the PDF successfully. However, I have observed the missing title placeholder text in exported PDF and an issue with ID 32881 has been created to resolve the issue. For your kind reference, the exported PDF is also attached.

Many Thanks,

After upgrading to 5.7.0 we have been able to convert pptx input to pdf.


Thanks.