PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Referencing PDFsharp https://forum.pdfsharp.net/viewtopic.php?f=2&t=1273 |
Page 1 of 1 |
Author: | SSB [ Wed Jul 21, 2010 10:01 pm ] |
Post subject: | Referencing PDFsharp |
Hi, I have been trying for a while now to get PDFsharp working in my C# windows form application I started by downloading the files and using the solution to create the PdfSharp.dll file, i added a reference to this in my project (right click on project name -> add reference). I then put "using PdfSharp;" at the top of my form and tried to add the line "PdfDocument document = new PdfDocument();". This didn't work, it came up with the error: The type or namespace name 'PdfDocument' could not be found (are you missing a using directive or an assembly reference?) I have also downloaded the assembly files you have given and (i didn't know which to use) tried both GDI+ and WPF versions of the PdfSharp.dll file. As a last ditch attempt i also tried adding the PdfSharp.csproj project to my solution but i'm not sure how i go about linking the project i'm working on with the PdfSharp project so that the error above will stop. Any help at all would be fantastic - feels like i've been going round and round in circles what with google searches and forum searches and all to no avail. Cheers, Sam. |
Author: | Thomas Hoevel [ Thu Jul 22, 2010 7:25 am ] |
Post subject: | Re: Referencing PDFsharp |
Hi! Unpack the PDFsharp source package, go to "PDFsharp\samples\Samples C#\Based on GDI+", open the appropriate solution - and look at the references of the Hello World sample. |
Author: | SSB [ Sun Jul 25, 2010 2:18 pm ] |
Post subject: | Re: Referencing PDFsharp |
Simple and effective, can't believe i didn't do that in the first place but it worked like a charm. Thanks for the help in my braindead moment Sam. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |