PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

dumb question: How do I install PDFSharp and MigraDoc?
http://forum.pdfsharp.de/viewtopic.php?f=2&t=867
Page 1 of 1

Author:  kavm [ Sun Sep 13, 2009 1:27 am ]
Post subject:  dumb question: How do I install PDFSharp and MigraDoc?

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!

Author:  briant [ Sun Sep 13, 2009 8:37 pm ]
Post subject:  Re: dumb question: How do I install PDFSharp and MigraDoc?

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

Author:  Thomas Hoevel [ Mon Sep 14, 2009 8:16 am ]
Post subject:  Re: dumb question: How do I install PDFSharp and MigraDoc?

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.

Author:  kavm [ Wed Sep 16, 2009 1:16 am ]
Post subject:  Re: dumb question: How do I install PDFSharp and MigraDoc?

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!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/