Hi
I have been using the editor to create a pdf file which we then email.
We have had to switch our web to a new hosting ISP, and now I get an error with the same code. I am hoping you can give me a pointer on how to fix this error. I am guessing its probably a config thing or something that needs to be setup.
The error I am getting is
System.Security.SecurityException: System.Security.Permissions.SecurityPermission
at CuteEditor.Convertor.PDF.PDFDocument.GetFontIndex(FontStyle fontStyle)
at CuteEditor.Convertor.PDF.PDFTextLine.RenderPDF(PDFDocument doc, Int32 swidth, Int32 sleft)
at CuteEditor.Convertor.PDF.PDFRect.RenderPDF()
at CuteEditor.Convertor.PDF.HTML2PDF.Render()
at CuteEditor.Editor.SavePDF(String path)
at GlobalsMod.SendBookingEmail(Int32 PaymentID)
at EventBookingIPN.SaveTransaction()
at EventBookingIPN.Page_Load(Object sender, EventArgs e)
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
MyComputer
This occurs when calling the SavePDF. I know i have permission to save in the directory I am trying to save into. I also tried saving to a memory stream using some different code and got the same permission problem. I have already set the CuteEditorTempPath and this made no difference. Code is copied below. The editor works fine in normal use, but here i am creating it in a variable rather than on a form.
Have you got any ideas on what i can do to stop this error?
Thanks
Dim PDF As New CuteEditor.Editor
Dim filename As String = System.Configuration.ConfigurationManager.AppSettings("TempDir") & "\" & oRD("Prefix") & PaymentID & ".pdf"
PDF.Text = "<html><body>hello</body></html>"
PDF.SavePDF(filename)