Print attached pptx document using:
var doc = new PresentationEx(docPath);
doc.Print(printer);
gets following exception
System.MethodAccessException :
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.
at ..(Bitmap bitmap)
at Aspose.Slides.Effects.ImageTransformOperationEx.(Bitmap img, pixEff)
at Aspose.Slides.Effects.Luminance.(Bitmap img, BaseSlideEx slide, FloatColor styleColor)
at Aspose.Slides.Effects.ImageTransformEx.(BaseSlideEx slide, FloatColor styleColor, Bitmap img)
at Aspose.Slides.Pptx.PictureEx.(BaseSlideEx slide, FloatColor styleColor, Boolean ownCopy)
at ..(ShapeFrameEx shapeFrame, GraphicsPath grPath, BaseSlideEx slide, FloatColor& styleColor, Object& rotatedBounds, IFillParamSource fillprop)
at ..(ShapeFrameEx shapeFrame, GraphicsPath grPath, BaseSlideEx slide, FloatColor& styleColor, Object& rotatedBounds, IFillParamSource fillprop)
at ..(ShapeFrameEx frame, GraphicsPath grPath, BaseSlideEx slide, IFillParamSource[] fillprops)
at .…ctor(ShapeFrameEx frame, GraphicsPath grPath, BaseSlideEx slide, IFillParamSource[] fillprops)
at Aspose.Slides.Pptx.SlideEx.( canvas)
at Aspose.Slides.Pptx.SlideEx.GetThumbnail(Size imageSize)
at Aspose.Slides.Pptx.SlideEx.GetThumbnail(Single scaleX, Single scaleY)
at Aspose.Slides.Export.PresentationPrintDocument.OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintDocument._OnPrintPage(PrintPageEventArgs e)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at Aspose.Slides.Pptx.PresentationEx.Print(PrinterSettings printerSettings, String presName)
at Aspose.Slides.Pptx.PresentationEx.Print(PrinterSettings printerSettings)
at Aspose.Slides.Pptx.PresentationEx.Print(String printerName)
The issues you have found earlier (filed as 31891) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.