PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jul 19, 2024 9:16 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Sep 05, 2011 1:14 pm 
Offline

Joined: Mon Sep 05, 2011 1:06 pm
Posts: 1
hello,

I'm new in monodroid programming. Now I try to create a PDF-Document with PDFsharp.
Creating the PDF-Document is no problem, but if I try to get some Content, always the fault
System.TypeLoadException: A type load exception has occurred appears.

Here is the code, which makes the problem (especially the line xGraphics gfx):

XFont font = new XFont("Verdana", 16);
XGraphics gfx = XGraphics.FromPdfPage(page);
gfx.DrawString("Hello World!", font, XBrushes.DarkGray, 15, 25, XStringFormats.Default);

I use Visual Studio 2010 and Monodroid.

I searched for articles or infos about this fault. The only thing I found was a advise to have a look on the framework version. But I really don't know what they mean with this...

Thank you a lot for your answer!

Best regards,
Nanuk
--------------------------------------------------------------------------------

Hallo zusammen,

Ich bin ein Neuling in der Monodroid-Programmierung. Nun versuche ich mittels PDFsharp ein PDF-Dokument zu generieren.
Ein leeres PDF-Dokument kann ich ohne Probleme erstellen, nur wenn ich versuche Inhalt (beispielsweise HelloWorld!) in das PDF zu schreiben, erhalte ich immer denselben Fehler: System.TypeLoadException: A type load exception has occurred

Dieser Code-Teil verursacht den Fehler (genauer die Zeile mit xGraphics):

XFont font = new XFont("Verdana", 16);
XGraphics gfx = XGraphics.FromPdfPage(page);
gfx.DrawString("Hello World!", font, XBrushes.DarkGray, 15, 25, XStringFormats.Default);

Ich verwende Visual Studio 2010 mit dem Monodroid-Plugin.

Ich habe auch schon nach Artikeln zu dem Fehler gesucht und auch etwas gefunden. Dort war der Hinweis, dass es an einer falschen Frameworkversion liegen kann. Leider verstehe ich nicht genau, was damit gemeint ist...

Ich bin froh und dankbar für jeden Hinweis!

Grüsse,
Nanuk


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 72 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