PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed May 01, 2024 2:43 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Apr 29, 2010 8:02 am 
Offline
User avatar

Joined: Sat Feb 07, 2009 6:15 pm
Posts: 2
Location: Hanau, Germany
Hi,

I have a problem with the XFont class. I developed an application that runs in Azure, Microsoft's cloud. This application has a class that creates a simple PDF which contains only the plain text body of an e-mail. The tests all work perfectly, but when I start my service in the Development Fabric (local cloud simulation environment), I always get an OutOfMemoryException when creating the XFont that is used in my PDF. I also get this exception when I run the service in the "real" cloud. But I think it is pretty impossible that there is really not enough memory. My application (which is not very large) is assigned 1,7 GB of RAM.

Here is the code I use:
Code:
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode);
XFont font = new XFont("Courier New", 10.0 * (127.0 / 360.0), XFontStyle.Regular, options);


I also tried:
Code:
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode);
Font f = new Font("Courier New", 10.0f, GraphicsUnit.World);
XFont font = new XFont(f, options);


But every time I want to create the XFont object, my app crashes.

Do you have any suggestions?

Thanks in advance - Andy aka fero

Edit:
P.S.: I'm using PDFsharp 1.31.1789.0 GDI+ in Visual Studio 2010 RTM with Windows Azure SDK 1.1 (Feb 2010)


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 29, 2010 8:37 am 
Offline
User avatar

Joined: Sat Feb 07, 2009 6:15 pm
Posts: 2
Location: Hanau, Germany
Never mind. Sorry for not searching the forum correctly... :oops:

viewtopic.php?f=2&t=954


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group