Friday, January 18, 2013

How to Create a PDF File in VB.Net


1. Download and install Bytescout.PDF library for .NET from the ByteScout website. You do have to pay to use this software. The price was $245.00 as of 2009.
2. Launch Microsoft Visual Studio .NET on your computer. Click 'File' then 'New' then 'Project' to open the new project wizard.
3. Select 'Windows Application' under the 'Visual Basic Projects' section. Click 'OK' to create the new project.
4. Click 'Project' from the main menu. Select 'Add Reference...' to use Bytescout.PDF. Switch to your 'Browse' tab to find the Bytescout.PDF.dll file. If you are using the free trial you will be looking for Bytescout.PDF.Demo.dll instead. When you find the file, select it to add it as a reference.
5. Double click on Form1 to add the source code for creating the PDF. When the source code editing window appears type 'Imports Bytescout.PDF' at the beginning, then copy and past the source code from the ByteScout page (see Resources).
6. Press F5 to initiate the application to create the PDF file. Once the PDF is created, it will open in your PDF reader on your computer.