VB.NET PDF: How to HTML5 PDF Viewer PDF Create PDF Export File & Page Process PDF Read PDF Write Form Process Document Protect Annotation & Drawing PDF Print WPF PDF Viewer Work with Other SDKs Barcode Read Barcode Create OCR Twain
PDF Create
Home ›› XDoc.PDF ›› VB.NET PDF: PDF Create

VB.NET PDF - PDF Creating Using VB.NET

How to Create a PDF using VB.NET Codes in a .NET Imaging Project

Free PDF creator SDK library compatible with Visual Basic .NET class and able to create PDF in both .NET WinForms and ASP.NET program

Batch create adobe PDF document from multiple forms in VB.NET

Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint

Best VB.NET component to convert Microsoft Office Word, Excel and PowerPoint to searchable PDF document

Gratis control for creating PDF from multiple image formats such as tiff, jpg, png, gif, bmp, etc

Create writable PDF file from text (.txt) file in VB.NET project

HTML webpage to interactive PDF file creator freeware

Create multipage PDF from OpenOffice and CSV file

Create and save editable PDF with a blank page, bookmarks, links, signatures, etc

Create fillable PDF document with fields in Visual Basic .NET application

Load PDF from existing documents and image in SQL server

Load PDF from stream programmatically in VB.NET

Free trial and use online source code are available for evaluation in .NET Framework

Creating a PDF document is a good way to share your ideas because you can make sure that the PDF file cannot be altered without authorization or leaving footprint. If your application is in need of generating a PDF document for processing and editing, you can choose this RasterEdge PDF file creator for Visual Basic .NET. This library control makes PDF file generating a piece of cake, as it can be easily integrated into many MS Visual Studio .NET applications to create PDF with just a few VB.NET codings. By using Public Sub RasterEdgePdfCreator(), high quality PDF document creation can be achieved easily.

To get this RasterEdge PDF document file creator library, you can download the RasterEdge .NET Image SDK and find the PDF processing component DLL in the Bin folder. We have also provided you with a demo project, which you can find in the Imaging Demo directory, with a file name RasterEdge.Imaging.Demo.PDF.

VB.NET: DLLs for Creating PDF

In order to run the sample code, the following steps would be necessary.

Add necessary references:









Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

VB.NET: Create a New PDF Document with One Blank Page

In VB.NET class programming, you can use specific APIs to create PDF file. And the PDF document can contain one empty page or multiple empty pages. The following example will tell you how to create a PDF document with 2 empty pages.

Dim outputFile As String = Program.RootPath + "\\" + "output.pdf"

' Create a new PDF Document object with 2 blank pages
Dim doc As PDFDocument = PDFDocument.Create(2)

' Save the new created PDF document into file

VB.NET: Load PDF Document from Existing PDF File

You may also load or create a PDF document object from existing PDF file in VB.NET.

' Load from a file
Dim inputFilePath1 As String = Program.RootPath + "\\" + "1.pdf"
Dim doc1 As PDFDocument = New PDFDocument(inputFilePath1)
If IsNothing(doc1) Then
    Throw New Exception("fail to load the file")
End If
' ...

VB.NET: Load PDF from Stream Object

By using this demo code, PDF document can be loaded from a stream object in VB.NET programming.

' Load from a stream
Dim inputFilePath2 As String = Program.RootPath + "\\" + "2.pdf"
Dim fileStream As FileStream = File.Open(inputFilePath2, FileMode.Open, FileAccess.Read)
Dim doc2 As PDFDocument = New PDFDocument(fileStream)
If IsNothing(doc2) Then
    Throw New Exception("fail to load PDF document from the stream")
End If
' ...