This project is read-only.

Error attempting to add reference to PdfSharp-WP7


I am trying to use PdfSharpop For WP7 in VS2012. When I brows to the DLL location try to add a reference to PdfSharp-WP7.dll from my Windows Phone 7.1 project I get the following error:

"A reference to a higher version or incompatible assembly cannot be added to the project."

What can I do to resolve this?

Also, thank you for taking the time to port PdfSharp to the Windows Phone platform.

-- roschler


DevTheo wrote Apr 5, 2013 at 3:08 PM

You will probably need to pull the source code and recompile. I'm not sure what version I last compiled it with.

roschler wrote Apr 5, 2013 at 3:41 PM

That's what I did and did not get any errors during compilation. Thanks.

-- roschler

dipen27 wrote Jul 31, 2013 at 5:12 AM

Hi, I was having the same issue. I got it fixed by re-compiling the source code. However when i try to do this:-
        // Create a new PDF document
        PdfDocument document = new PdfDocument();

        // Create an empty page
        PdfPage page = document.AddPage();

        // Get an XGraphics object for drawing
        XGraphics gfx = XGraphics.FromPdfPage(page);

        // Create a font
        XFont font = new XFont("Verdana", 20, XFontStyle.Bold);

        // Draw the text
       // gfx.DrawRectangle(XBrushes.Black, new XRect(0, 0, page.Width, page.Height));
        gfx.DrawString("Hello, World!", font, XBrushes.Black,
          new XRect(0, 0, page.Width, page.Height),
It crashes on the " XFont font = new XFont("Verdana", 20, XFontStyle.Bold);" . Can some one please help me. Thanks!