Create PDF file in C# and VB.NET with GemBox.Document component.
GemBox.Document is a C# / VB.NET component that enables developers to read, write, convert and print document files (DOCX, HTML, PDF, XPS) from .NET applications in a simple and efficient way without the need for Microsoft Word on either the developer or client machines.
GemBox.Document Free is free of charge while GemBox.Document Professional is a commercial version licensed per developer.
For more information, see GemBox.Document features and why GemBox.Document outperforms Word automation.
Following example creates a PDF file.
C# code
// Create a new empty document.
var document = new DocumentModel();
// Add document content.
document.Sections.Add(
new Section(document,
new Paragraph(document, "Hello world!")));
// Save the document to a PDF file.
document.Save("Document.pdf");
VB.NET code
' Create a new empty document.
Dim document = New DocumentModel()
' Add document content.
document.Sections.Add(
New Section(document,
New Paragraph(document, "Hello world!")))
' Save the document to a PDF file.
document.Save("Document.pdf")
For a more detailed example, see Writing sample from GemBox.Document Sample Explorer.
