So I have this project I'm working on in C# that uses pdfsharp. Unfortunately I am having problems debugging it. The project creates information that is sent to a library that uses pdfsharp to create a pdf. Visual Studio compiles the solution without errors, but it doesn't work in the parent application.
It seems to have trouble drawing images. I keep getting a "system cannot find file specified error". I'm using the GDI version of PDFSharp
I think I've initilized the variables correctly.
PdfDocument document; PdfPage page; XGraphics gfx; XImage rerun; //test image
Because I can draw an image. gfx.DrawImage(rerun, border, 10); gfx.DrawImage(rerun, page.Width - rerun.Width, 10);
That code works. But it stops on this line and I get "system cannot find file specified error". gfx.DrawImage(rerun, border, 184);
Are there any suggestions? Thanks, Chris
Edit: I think I found the problem. I had tried to save the document in multiple locations, and at different times. And I also had saved the document just before gfx.DrawImage(rerun, border, 184);. So I think the program had exited from that code when I tried to edit the saved document by drawing an image.
|