PDFsharp & MigraDoc Foundation

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

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Referencing PDFsharp
PostPosted: Wed Jul 21, 2010 10:01 pm 
Offline

Joined: Wed Jul 21, 2010 9:42 pm
Posts: 2
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Referencing PDFsharp
PostPosted: Thu Jul 22, 2010 7:25 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3110
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: Referencing PDFsharp
PostPosted: Sun Jul 25, 2010 2:18 pm 
Offline

Joined: Wed Jul 21, 2010 9:42 pm
Posts: 2
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.


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

All times are UTC


Who is online

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