5/10/11

How to Print PDF From VB.NET

If you try to open a PDF file with VB.NET, you will get a hard-to-decipher error message. You might think the problem is the file, but it is in fact the program itself. VB.NET does not come with PDF compatibility. However, enough users have complained over the years that Visual Basic now offers a free PDF add-on. After installing this, you can open and print your PDFs from VB.NET.
    • 1

      Navigate to the Visual Basic website (see References).

    • 2

      Click the link marked "VB PDF tutorial source code." Hit "CTRL + F" and enter in that phrase if you can't find it.

    • 3

      Unzip the ZIP file that downloads. You will need an archive program like WinZip (many computers come with one already installed).

    • 4

      Select the two files in the window that pops up. Hold down the "CTRL" key as you click to select both. Drag and drop them into any folder on your hard drive, as long as they end up in the same folder.

    • 5

      Open VB.NET.

    • 6

      Click "Add File" from the Project menu.

    • 7

      Go to the files you saved in Step 4.

    • 8

      Select "mjwPDF.cls" and then click "Open." VB.NET is now PDF-compatible and will remain that way as long as you don't move either of the two aforementioned files.

    • 9

      Select "Open" from the File menu.

    • 10

      Choose the PDF you wish to print and click "Open."

  • No comments: