Hi, am trying to get this scenario to work:
Environment: CRM 2016 online.
1) Compiled aspose.words dll into custom workflow activity. The code takes attachment in notes and converts into pdf, in memory.
byte[] fileContent = Convert.FromBase64String(d["documentbody"].ToString());
Stream stream = new MemoryStream(fileContent);
Aspose.Words.Document doc = new Aspose.Words.Document(stream);
MemoryStream dstStream = new MemoryStream();
doc.Save(dstStream, Aspose.Words.SaveFormat.Pdf);
Stream stream = new MemoryStream(fileContent);
Aspose.Words.Document doc = new Aspose.Words.Document(stream);
MemoryStream dstStream = new MemoryStream();
doc.Save(dstStream, Aspose.Words.SaveFormat.Pdf);
2) Registered custom workflow in CRM2016 online.
3) I put this into a workflow, and run.
The following error comes up on the workflow step:
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 debugging it is erroring on the save. Is it trying to load true type fonts, and being online, there is no access to font directory? (I have tried embedding the fonts onto the word doc, but no success.)
Is it actually possible to get pdf conversion to work with CRM 2016 online?