Hi
I am using PDFsharp library to merge some PDF's.
Preliminary with server and client on my Win7 development machine.
But when trying to read or write to files a get this error on the PdfReader.Open statement, indicating PDFsharp is not allowed to do file access.
Any suggestion on how to set permissions will be appreciated.
InputFileName := FileManager.ServerTempFileName('pdf');
TempBLOB.Blob := Attachments."Embedded File";
FileManager.BLOBExportToServerFile(TempBLOB, InputFileName);
InputDocument:= PdfReader.Open(InputFileName, PdfDocumentOpenMode.Import);
FOR Count := 0 TO InputDocument.Pages.Count - 1 DO
BEGIN
Page := InputDocument.Pages.Item(Count);
OutputDocument.AddPage(Page);
END;
Error:
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
0
Comments
Keep in mind that with RunOnClient = false the Service user performs the action, and therefore has to be permitted to do so.
Also make sure to not mess up local and server paths.
Regards, /wisa
- sure that temporary file really exists and have nonzero length.
How i can unlock DLL?