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

System.TypeLoadException: A type load exception has occurred
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1773
Page 1 of 1

Author:  nanuk [ Mon Sep 05, 2011 1:14 pm ]
Post subject:  System.TypeLoadException: A type load exception has occurred

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

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