PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Jul 02, 2024 11:11 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Sep 13, 2009 1:27 am 
Offline

Joined: Sun Sep 13, 2009 1:17 am
Posts: 2
Sorry about asking a basic question, but I am an amateur:

I want to develop using PDFSharp in Visual Studio 2008 C# environment. I downloaded the PDFSharp-MigraDocFoundation-1_30.zip, but do not know how to install these libraries. The zip file has the two directories PDFSharp and MigraDoc and bunch of directory underneath them. I could see the example projects, etc. However, I am not sure of two things:
  • What is the right folder this zip file should be extracted to?
  • What specific exe, dll etc. needs to be added in reference?

I know these are really basic questions, but I do not have much experience with using external packages and can't seem to get past this basic stuff.

I'd deeply appreciate some help. Thanks a lot!


Top
 Profile  
Reply with quote  
PostPosted: Sun Sep 13, 2009 8:37 pm 
Offline

Joined: Sun Sep 13, 2009 8:12 pm
Posts: 4
I am also new to MigraDoc.

I have managed to get some samples running, and here is what I done.

Go to:

http://pdfsharp.codeplex.com/Release/Pr ... seId=31456

Download the precompiled binary (dll) files: PDFsharp-MigraDocFoundation-Assemblies-1_30.zip.

The file you downloaded (PDFSharp-MigraDocFoundation-1_30.zip) is just the source code. The files in the zip file above are compiled versions: basically saves you compiliing the source.

If you unzip these to a directory you will get a number of MigraDoc and PDFsharp dll files.

In Visual Studio create a new project. Make it a console application. In the solution explorer, right click the references section, add reference and browse to where the dlls were unzipped to. Add all the dlls as references. Then you can use the packages in the source code.

My program.cs file is attached below: it's one of the sample examples from the website but with some using statements at the top.

Hope this helps.

Cheers,
Brian

Edit (by forum admin): sample code removed (complete sample code included in download package).
See also here:
http://www.pdfsharp.net/wiki/HelloWorld-sample.ashx
http://www.pdfsharp.net/wiki/MigraDocHe ... ample.ashx


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 14, 2009 8:16 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
kavm wrote:
  • What is the right folder this zip file should be extracted to?
  • What specific exe, dll etc. needs to be added in reference?


Unzip anywhere.
After unzipping, you should check out the samples:
PDFsharp\samples\Samples C#\Based on GDI+
or PDFsharp\samples\Samples C#\Based on WPF

MigraDoc\samples\Samples C#\Based on GDI+
or MigraDoc\samples\Samples C#\Based on WPF

Just load the solution for Visual Studio 2008 (PDFsharp Samples-VS2008.sln or MigraDoc Samples-VS2008.sln).
All required libraries will be built when you run a sample.

When creating new applications, I add the PDFsharp and MigraDoc projects to my new solution. That's all.
Intellisense works and you can use F12 to jump to the source of any PDFsharp or MigraDoc method.

No need to download the compiled binaries if you use it that way.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Wed Sep 16, 2009 1:16 am 
Offline

Joined: Sun Sep 13, 2009 1:17 am
Posts: 2
Many thanks to both of you! I have been traveling and only now got the chance to check back to my thread.

I appreciate it. Will try the solutions suggested. Thanks!


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

All times are UTC


Who is online

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