-
Jan 21st, 2010, 08:55 PM
#1
Thread Starter
Junior Member
[RESOLVED] Adding PDFSharp as reference
Hey Guys,
I am using Vb 2008 Express Edition.
I am trying to use PDfSharp to create my output file as a PDF document. I downloaded PDFSharp-MigraDocFoundation-1_31. It has many folders. I don't know what exe, dll etc. needs to be added and where?
The online example for "Hello World" says:
Imports PdfSharp
Imports PdfSharp.Drawing
Imports PdfSharp.Pdf
I can't find where these are located. Most of the file extensions are *.cs.
Thanks,
N_U
Last edited by Vb_Novice_User; Jan 21st, 2010 at 08:59 PM.
-
Jan 21st, 2010, 09:20 PM
#2
Re: Adding PDFSharp as reference
If the extensions are ".cs" then you have downloaded the source code. You would need to compile that source into a DLL using C# Express or VS. You can then reference that DLL in your own apps.
I haven't looked but I'm guessing that there's an alternate download that is just the binary file(s) and maybe also one that includes an installer. You might want to consider one of those if you don't need to view or edit the source code.
-
Jan 21st, 2010, 11:57 PM
#3
Thread Starter
Junior Member
Re: Adding PDFSharp as reference
Thank you, jm
I was able to find a PDFsharp-MigraDocFoundation-Assemblies-1_31 which already had the dll extracted.
I copied the Hello World prog from.
Code:
http://www.pdfsharp.net/wiki/HelloWorld-sample-VB.ashx
There is no info on how to run this
I setup a form with a button and I called the main( ) in my button_click event. It compiled but the button click does nothing
Thanks,
N_U
-
Jan 22nd, 2010, 12:08 AM
#4
Re: Adding PDFSharp as reference
As it says on the page containing that VB sample:
This is the whole Visual Basic .NET source code needed to create the PDF file
You create a new Console Application project, reference the PDFSharp DLL, copy that code over the top of the code in your default module and you're good to go.
There is one more thing to do though. Your new project will have a module named Module1, whereas that code uses Program as the module name. You'll have to either change that name back to Module1 after pasting or else change the project's Startup Object to Program or Sub Main.
-
Jan 22nd, 2010, 06:55 AM
#5
Thread Starter
Junior Member
Re: [RESOLVED] Adding PDFSharp as reference
Thank you jm,
It took me a while to figure out how to implement this into my original app. Finally I have both my graphics and text in a pdf doc w/o using a 3rd party pdf writer
More Q's to follow soon
Cheers,
N_U
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|