Cannot save to PDF when images are in the document

I get this error:

Unhandled Exception: Microsoft.Crm.CrmException: Unexpected exception from plug-in (Execute): UNICEF.Workflows.GenerateReceipt: System.Security.SecurityException: Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

When trying to save a PDF that contains images. When I save the same PDF without the images it works.
This is from within Microsoft Dynamics CRM.

Hi there,

Thanks for your inquiry. This issue seems not to be related to Aspose.Words. I suggest you please read following web links for your kind reference.

http://www.codeproject.com/Questions/586223/SecurityplusExceptionpluscomingplusinplusaplusrunn
Second Link
Third Link

If the problem still remains, please attach your input Word document here for testing. I will investigate the issue on my side and provide you more information.