Hello,
I am creating a sharepoint webpart that uses the Aspose.Word and Aspose.Pdf components to concenate all the doucments from a document library into 1 PDF document.
This is the part of the solution that causes the problem:
Document srcDoc = new Document(saveTmpDirectory + bestand.Name);
srcDoc.SaveOptions.ExportImagesFolder = @"F:\Temp\generateWord\";
srcDoc.SaveOptions.HtmlExportImagesFolderAlias = @"F:\Temp\generateWord\";
srcDoc.Save(saveTmpDirectory + nieuweBestandsNaam + ".xml", SaveFormat.AsposePdf);
// een pdf bestand maken van het word bestand
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(saveTmpDirectory + nieuweBestandsNaam + ".xml", null);
pdf.IsImagesInXmlDeleteNeeded = true;
pdf.Save(saveTmpDirectory + nieuweBestandsNaam + ".pdf");
I am getting the following exception: System.Security.Permissions.EnvironmentPermission.
I am saving the pdf file locally and have given sharepoint the rights to save at the directory. The xml files are generated correctly when i remove the pdf.save
What can cause the exception?
I have tested giving write right to the windows temp dir but this doesnt solve the problem.
Thanks for the help!