PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Once again: PDFSharp, ASP.NET and medium trust
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1606
Page 1 of 1

Author:  pica [ Thu Mar 31, 2011 9:52 am ]
Post subject:  Once again: PDFSharp, ASP.NET and medium trust

Hello,

after having read several threads on the topic of using PDFSharp in a medium trust environment, I wanted to bring this up again.

First, some of the previous threads indicated that the WPF version of PDFSharp may run in medium trust. My experiments did not confirm this. As a prerequisition, I had to recompile all assemblies with the [assembly: AllowPartiallyTrustedCallers()] attribute. Having done this, the web application compiles and runs, but throws an exception (System.Security.Permissions.FileIOPermission) in PdfSharp.Fonts.OpenType.CreateWpfFontData - the method fails on calling System.Windows.Media.GlyphTypeface.GetFontStream().

My questions are:
1.) Has anyone been successful in getting PDFSharp/WPF to work in a medium trust environment?
2.) It's been some time since the last public release of PDFSharp. Is there a time frame in which we can expect a new release, and will it support medium trust?

Oh, and just for the record: No, I cannot use iTextSharp due to its AGPL license.

By the way, thanks for this otherwise great piece of software! Any reply will be greatly appreciated.

Author:  Thomas Hoevel [ Thu Mar 31, 2011 12:25 pm ]
Post subject:  Re: Once again: PDFSharp, ASP.NET and medium trust

pica wrote:
1.) Has anyone been successful in getting PDFSharp/WPF to work in a medium trust environment?

I haven't tried.

AFAIK it should work as long as only private fonts are used (medium trust applications are not allowed to read font files from C:\Windows\Fonts or wherever they may be).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/