Differences with GDI+ when running under asp.net or nunit

  • Thread starter Thread starter grant.trevor
  • Start date Start date
G

grant.trevor

I'm using the free pdf creation library pdfsharp(www.pdfsharp.com) to
create a set of pdfs. This library makes heavy usage of System.Drawing
and GDI+

I first implemented the pdf creation utility in a class that I than
triggered via a simple NUnit test, a console application would have
sufficed. Elements on the document are difined using X Y cordinates and
height width.

Everything looked fine until I then went to call the class within
asp.net. I know find that items are no longer in the same position etc.

I'm currenty working on the assumption that GDI+ uses a different
rendering engine for the two different implementations, and that is
what is causing the issue.

I know this is quite light on details however in a hurry. Really just
want to know if I'm right in my assumption, and if any could give me a
nudge in the right direction.
 
Bad news I'm afraid:
http://msdn2.microsoft.com/en-us/library/system.drawing.aspx
<q>
Classes within the System.Drawing namespace are not supported for use
within a Windows or ASP.NET service. Attempting to use these classes
from within one of these application types may produce unexpected
problems, such as diminished service performance and run-time
exceptions.
</q>

So the short answer is: it might not work at all, let alone
identically.

It was news to me too, when somebody else pointed it out to me (on this
forum).

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top