# VB.NET PDF Creator (Code Example Tutorial)
This tutorial will guide you step-by-step on how to create and edit PDF files in VB.NET. This technique is equally valid for use in **ASP.NET web apps** as well as **console applications**, **Windows Services**, and **desktop programs**. We will use VB.NET to create PDF projects targeting .NET Framework 4.6.2 or .NET Core 2. All you need is a Visual Basic .NET development environment, such as Microsoft Visual Studio Community.
To see how to use IronPDF with **C#** see [this guide](/docs/).
To see how to use IronPDF with **F#** see [this guide](/get-started/fsharp-pdf-library-html-to-pdf/).
---
## Overview
### How to Generate PDF Files in VB .NET Library
1. [Download the VB.NET PDF Library](https://nuget.org/packages/IronPdf/)
2. Create a PDF document with VB.NET Library
3. Customize your PDF document styles
4. Choose which methods to create dynamic content
5. Edit your PDF files from VB.NET Library
## VB .NET Codes for PDF Creating and Editing with IronPDF
Render HTML to PDF with VB.NET, apply styling, utilize dynamic content, and edit your files easily. Creating PDFs is straightforward and compatible with .NET Framework 4.6.2, .NET Core 3.1, and .NET 5 through 10. And no need for proprietary file formats or dealing with different APIs.
This tutorial provides the documentation to walk you through each task step-by-step, all using the free-for-development [IronPDF software favored by developers](https://ironpdf.com). VB.NET code examples are specific to your use cases so you can see the steps easily in a familiar environment. This VB .NET PDF library has comprehensive creation and settings capabilities for every project, whether in ASP.NET applications, console, or desktop.
### Included with IronPDF:
- Ticket support direct from our .NET PDF Library development team
- Works with HTML, ASPX forms, MVC views, images, and all the document formats you already use
- Microsoft Visual Studio installation gets you up and running fast
- Unlimited free development, and licenses to go live starting at `$liteLicense`
---
## Step 1
### 1. Download the VB .NET PDF Library FREE from IronPDF
!!!--LIBRARY_START_TRIAL_BLOCK--!!!
#### Install via NuGet
In Visual Studio, right-click on your project in the Solution Explorer and select "Manage NuGet Packages...". From there simply search for IronPDF and install the latest version... click OK to any dialog boxes that come up.
This will work in any C# .NET Framework project from Framework 4.6.2 and above, or .NET Core 2 and above. It will also work just as well in VB.NET projects.
```shell
:ProductInstall
```
[Download IronPDF from NuGet](https://www.nuget.org/packages/IronPdf)
#### Install via DLL
Alternatively, the IronPDF DLL can be downloaded and manually installed to the project or GAC from [IronPDF Downloads](https://ironpdf.com/packages/IronPdf.zip)
Remember to add this statement to the top of any **VB** class file using IronPDF:
```vbnet
Imports IronPdf
```
---
## How to Tutorials
### 2. Create a PDF with VB.NET
Using **Visual Basic ASP.NET** to create a PDF file for the first time is surprisingly easy using IronPDF, as compared to libraries with proprietary design APIs such as ***iText***.
We can use HTML (with a pixel-perfect rendering engine based on Google Chromium) to define the content of our PDF and simply render it to a file.
Here is the basic code to create a PDF in VB.NET:
```vbnet
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim document = renderer.RenderHtmlAsPdf("<h1> My First PDF in VB.NET</h1>")
document.SaveAs("MyFirst.pdf")
End Sub
End Module
```
This will produce a .NET-generated PDF file containing your exact text, albeit lacking some design at this point.
To improve upon this code, we can add the following line to open the PDF in the operating system's default PDF viewer:
```vbnet
Imports IronPdf
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim document = renderer.RenderHtmlAsPdf("<h1> My First PDF in VB.NET</h1>")
document.SaveAs("MyFirst.pdf")
System.Diagnostics.Process.Start("MyFirst.pdf")
End Sub
End Module
```
An alternative method would be to render any existing web page from a URL to a PDF by using the elegant `RenderUrlAsPdf` method from IronPDF.
```vbnet
Imports IronPdf
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim document = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/")
document.SaveAs("UrlToPdf.pdf")
System.Diagnostics.Process.Start("UrlToPdf.pdf")
End Sub
End Module
```
---
### 3. Apply Styling to VB.NET PDF
To style our ***PDF*** content in VB.NET, we can make full use of CSS, JavaScript, and images. We may link to local assets, or even to remote or CDN-based assets such as Google Fonts. We can even use [DataURIs to embed images and assets as a string into your HTML](/how-to/datauris/).
For advanced design, we can use a 2-stage process:
1. First, we develop and design our HTML perfectly. This task may involve in-house design staff, splitting the workload.
2. Render that file as a PDF using VB.NET and our PDF library.
#### The VB.NET Code to render the HTML file as a PDF:
This method renders an HTML document as if it were opened as a file (***file:// protocol***).
```vbnet
Dim Renderer As New IronPdf.ChromePdfRenderer()
Renderer.RenderingOptions.PaperOrientation = IronPdf.Rendering.PdfPaperOrientation.Landscape
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
Dim PDF As IronPdf.PdfDocument = Renderer.RenderUrlAsPdf("file://path-to-your-html-file.html")
PDF.SaveAs("styled-sample.pdf")
```
---
### 4. Create PDF w/ Dynamic Content: 2 Methods
Historically, PDF 'templating' has been an overwhelming task for Software Engineers. Stamping content into PDF templates rarely works because each case or report will contain content of varying types and lengths. Fortunately, HTML is exceptionally good at handling Dynamic Data.
#### 4.1. Method 1 - ASP.NET - ASPX to PDF using VB.NET Web Forms
Any flavor of .NET Web Form (including Razor) can be rendered into a PDF document using this VB.NET code in the Page_Load subroutine in the VB.NET code behind.
```vbnet
Imports IronPdf
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim PdfOptions = New IronPdf.ChromePdfRenderOptions()
IronPdf.AspxToPdf.RenderThisPageAsPDF(AspxToPdf.FileBehavior.Attachment, "MyPdf.pdf", PdfOptions)
End Sub
```
#### 4.2. Method 2 - HTML to PDF with String Templating
To create dynamic PDF documents that include instance-specific data, we simply create an HTML string to match the data we wish to render as a PDF.
```vbnet
Imports IronPdf
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim Html = "Hello {0}"
String.Format(Html, "World")
Dim document = renderer.RenderHtmlAsPdf(Html)
document.SaveAs("HtmlTemplate.pdf")
System.Diagnostics.Process.Start("HtmlTemplate.pdf")
End Sub
End Module
```
---
## 5. Edit PDF Files with VB.NET
IronPDF for VB.NET also allows PDF documents to be edited, encrypted, watermarked, or even turned back into plain text:
#### 5.1. Merging Multiple PDF Files into One Document in VB
```vbnet
Dim pdfs = New List(Of PdfDocument)
pdfs.Add(PdfDocument.FromFile("A.pdf"))
pdfs.Add(PdfDocument.FromFile("B.pdf"))
pdfs.Add(PdfDocument.FromFile("C.pdf"))
Dim mergedPdf As PdfDocument = PdfDocument.Merge(pdfs)
mergedPdf.SaveAs("merged.pdf")
mergedPdf.Dispose()
For Each pdf As PdfDocument In pdfs
pdf.Dispose()
Next
```
#### 5.2. Add a Cover Page to the PDF
```vbnet
pdf.PrependPdf(renderer.RenderHtmlAsPdf("<h1>Cover Page</h1><hr>"))
```
#### 5.3. Remove the last page from the PDF
```vbnet
pdf.RemovePage((pdf.PageCount - 1))
```
#### 5.4. Encrypt a PDF using 128 Bit Encryption
```vbnet
// Save with a strong encryption password.
pdf.Password = "my.secure.password";
pdf.SaveAs("secured.pdf")
```
#### 5.5. Stamp Additional HTML Content Onto a Page in VB
```vbnet
Imports IronPdf
Imports IronPdf.Editing
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
Dim stamp = New HtmlStamper()
stamp.Html = "<h2>Completed</h2>"
stamp.Opacity = 50
stamp.Rotation = -45
stamp.VerticalAlignment = VerticalAlignment.Top
stamp.VerticalOffset = New Length(10)
pdf.ApplyStamp(stamp)
pdf.SaveAs("C:\Path\To\Stamped.pdf")
End Sub
End Module
```
#### 5.6. Add Page Break to PDF Using HTML
The easiest way to do this is with HTML and CSS:
```csharp
<div style='page-break-after: always;'> </div>
```
---
## 6. More .NET PDF Tutorials
You may also be interested in:
- [The full VB.NET and C# MSDN style API reference](/object-reference/api/IronPdf.html)
- [A tutorial about converting ASPX to PDF for VB.NET and C#](/how-to/aspx-to-pdf/)
- [An in-depth tutorial about rendering HTML to PDF for VB.NET and C#](/tutorials/html-to-pdf/)
---
## Conclusion
In this tutorial, we discovered 6 ways to achieve VB.NET to PDF results using VB.NET as our programming language of choice.
- HTML string to PDF
- Creating a PDF in VB.NET using an HTML string to define its content
- Rendering existing URLs as PDF files
- Generating PDF from HTML files
- HTML templating in VB.NET and conversion to dynamic PDFs
- Converting ASP.NET pages with live data, such as ASPX to PDF files
For each, we used the popular IronPDF [VB.NET library](/use-case/vb-dot-net-library/) to allow us to turn HTML directly into PDF documents within .NET projects.
<hr class="separator" />
<h4 class="tutorial-segment-title">Tutorial Quick Access</h4>
<div class="flex flex-col md:flex-row items-center gap-8 py-8 border-b border-[#e7eef0]">
<div class="w-full md:w-1/3 flex justify-center">
<img alt="" class="max-w-full h-auto drop-shadow-md" src="/img/svgs/brand-visual-studio.svg" />
</div>
<div class="w-full md:w-2/3">
<h3 class="text-2xl font-bold mb-3">Download this Tutorial as Source Code</h3>
<p class="mb-4">The full free VB.NET HTML to PDF Source Code for this tutorial is available to download as a zipped Visual Studio project file.</p>
<a class="inline-flex items-center gap-x-2 rounded-full border border-current px-6 py-3 text-sm font-bold no-underline transition-colors duration-200 hover:bg-black/5" href="/downloads/assets/tutorials/vb-net-pdf/VB.Net.Pdf.Tutorial.zip"><i class="fa fa-cloud-download"></i> Download</a>
</div>
</div>
<div class="flex flex-col md:flex-row items-center gap-8 py-8 border-b border-[#e7eef0]">
<div class="w-full md:w-2/3">
<h3 class="text-2xl font-bold mb-3">Explore this Tutorial on GitHub</h3>
<p class="mb-4">You may also be interested in our extensive library of VB.NET PDF generation and manipulation examples on GitHub. Exploring source code is the fastest way to learn, and Github is the definitive way to do so online. I hope these examples help you get to grips with PDF related functionality in your VB projects.</p>
<a class="flex items-center gap-x-2 py-1 font-bold no-underline hover:underline" href="https://github.com/iron-software/iron-pdf-example-asp.net-create-pdf" target="_blank">Creating PDFS in ASP.NET with VB.NET and C# Source <i class="fa fa-chevron-right text-xs"></i></a>
<a class="flex items-center gap-x-2 py-1 font-bold no-underline hover:underline" href="https://github.com/iron-software/iron-pdf-example-hello-world-vb.net" target="_blank">A Simple Hello World Project to Render HTML to PDF in VB.NET using IronPDF <i class="fa fa-chevron-right text-xs"></i></a>
<a class="flex items-center gap-x-2 py-1 font-bold no-underline hover:underline" href="https://github.com/iron-software/iron-pdf-example-html-to-pdf-vb.net" target="_blank">Exploring HTML To PDF in-depth with VB.NET <i class="fa fa-chevron-right text-xs"></i></a>
</div>
<div class="w-full md:w-1/3 flex justify-center">
<img alt="" class="max-w-full h-auto drop-shadow-md" src="/img/svgs/github-icon.svg" />
</div>
</div>
<div class="flex flex-col md:flex-row items-center gap-8 py-8 border-b border-[#e7eef0]">
<div class="w-full md:w-1/3 flex justify-center">
<img alt="" class="max-w-full h-auto drop-shadow-md" src="/img/svgs/html-to-pdf-icon.svg" width="214" height="141" />
</div>
<div class="w-full md:w-2/3">
<h3 class="text-2xl font-bold mb-3">Download C# PDF Quickstart guide</h3>
<p class="mb-4">To make developing PDFs in your .NET applications easier, we have compiled a quick-start guide as a PDF document. This "Cheat-Sheet" provides quick access to common functions and examples for generating and editing PDFs in C# and VB.NET - and will save time getting started using IronPDF in your .NET project.</p>
<a class="inline-flex items-center gap-x-2 rounded-full border border-current px-6 py-3 text-sm font-bold no-underline transition-colors duration-200 hover:bg-black/5" target="_blank" href="/csharp-pdf.pdf"><i class="fa fa-cloud-download"></i> Download</a>
</div>
</div>
<div class="flex flex-col md:flex-row items-center gap-8 py-8">
<div class="w-full md:w-2/3">
<h3 class="text-2xl font-bold mb-3">View the API Reference</h3>
<p class="mb-4">Explore the API Reference for IronPDF, outlining the details of all of IronPDF's features, namespaces, classes, methods fields and enums.</p>
<a class="flex items-center gap-x-2 py-1 font-bold no-underline hover:underline" href="/object-reference/api/IronPdf.html" target="_blank">View the API Reference <i class="fa fa-chevron-right text-xs"></i></a>
</div>
<div class="w-full md:w-1/3 flex justify-center">
<img alt="" class="w-[100px] h-[140px] drop-shadow-md" src="/img/svgs/documentation.svg" width="100" height="140" />
</div>
</div>
This tutorial will guide you step-by-step on how to create and edit PDF files in VB.NET. This technique is equally valid for use in ASP.NET web apps as well as console applications, Windows Services, and desktop programs. We will use VB.NET to create PDF projects targeting .NET Framework 4.6.2 or .NET Core 2. All you need is a Visual Basic .NET development environment, such as Microsoft Visual Studio Community.
VB .NET Codes for PDF Creating and Editing with IronPDF
Render HTML to PDF with VB.NET, apply styling, utilize dynamic content, and edit your files easily. Creating PDFs is straightforward and compatible with .NET Framework 4.6.2, .NET Core 3.1, and .NET 5 through 10. And no need for proprietary file formats or dealing with different APIs.
This tutorial provides the documentation to walk you through each task step-by-step, all using the free-for-development IronPDF software favored by developers. VB.NET code examples are specific to your use cases so you can see the steps easily in a familiar environment. This VB .NET PDF library has comprehensive creation and settings capabilities for every project, whether in ASP.NET applications, console, or desktop.
Included with IronPDF:
Ticket support direct from our .NET PDF Library development team
Works with HTML, ASPX forms, MVC views, images, and all the document formats you already use
Microsoft Visual Studio installation gets you up and running fast
Unlimited free development, and licenses to go live starting at $999
Step 1
1. Download the VB .NET PDF Library FREE from IronPDF
Start using IronPDF in your project today with a free trial.
First Step:
Install via NuGet
In Visual Studio, right-click on your project in the Solution Explorer and select "Manage NuGet Packages...". From there simply search for IronPDF and install the latest version... click OK to any dialog boxes that come up.
This will work in any C# .NET Framework project from Framework 4.6.2 and above, or .NET Core 2 and above. It will also work just as well in VB.NET projects.
Alternatively, the IronPDF DLL can be downloaded and manually installed to the project or GAC from IronPDF Downloads
Remember to add this statement to the top of any VB class file using IronPDF:
ImportsIronPdf
Imports IronPdf
VB .NET
How to Tutorials
2. Create a PDF with VB.NET
Using Visual Basic ASP.NET to create a PDF file for the first time is surprisingly easy using IronPDF, as compared to libraries with proprietary design APIs such as iText.
We can use HTML (with a pixel-perfect rendering engine based on Google Chromium) to define the content of our PDF and simply render it to a file.
Here is the basic code to create a PDF in VB.NET:
ModuleModule1 Sub Main() Dim renderer = New ChromePdfRenderer() Dim document = renderer.RenderHtmlAsPdf("<h1> My First PDF in VB.NET</h1>") document.SaveAs("MyFirst.pdf") End SubEndModule
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim document = renderer.RenderHtmlAsPdf("<h1> My First PDF in VB.NET</h1>")
document.SaveAs("MyFirst.pdf")
End Sub
End Module
VB .NET
This will produce a .NET-generated PDF file containing your exact text, albeit lacking some design at this point.
To improve upon this code, we can add the following line to open the PDF in the operating system's default PDF viewer:
ImportsIronPdfModuleModule1 Sub Main() Dim renderer = New ChromePdfRenderer() Dim document = renderer.RenderHtmlAsPdf("<h1> My First PDF in VB.NET</h1>") document.SaveAs("MyFirst.pdf")System.Diagnostics.Process.Start("MyFirst.pdf") End SubEndModule
Imports IronPdf
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim document = renderer.RenderHtmlAsPdf("<h1> My First PDF in VB.NET</h1>")
document.SaveAs("MyFirst.pdf")
System.Diagnostics.Process.Start("MyFirst.pdf")
End Sub
End Module
VB .NET
An alternative method would be to render any existing web page from a URL to a PDF by using the elegant RenderUrlAsPdf method from IronPDF.
ImportsIronPdfModuleModule1 Sub Main() Dim renderer = New ChromePdfRenderer() Dim document = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/") document.SaveAs("UrlToPdf.pdf")System.Diagnostics.Process.Start("UrlToPdf.pdf") End SubEndModule
Imports IronPdf
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim document = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf/")
document.SaveAs("UrlToPdf.pdf")
System.Diagnostics.Process.Start("UrlToPdf.pdf")
End Sub
End Module
VB .NET
3. Apply Styling to VB.NET PDF
To style our PDF content in VB.NET, we can make full use of CSS, JavaScript, and images. We may link to local assets, or even to remote or CDN-based assets such as Google Fonts. We can even use DataURIs to embed images and assets as a string into your HTML.
For advanced design, we can use a 2-stage process:
First, we develop and design our HTML perfectly. This task may involve in-house design staff, splitting the workload.
Render that file as a PDF using VB.NET and our PDF library.
The VB.NET Code to render the HTML file as a PDF:
This method renders an HTML document as if it were opened as a file (file:// protocol).
DimRendererAs New IronPdf.ChromePdfRenderer()Renderer.RenderingOptions.PaperOrientation = IronPdf.Rendering.PdfPaperOrientation.LandscapeRenderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.PrintDimPDFAsIronPdf.PdfDocument = Renderer.RenderUrlAsPdf("file://path-to-your-html-file.html")PDF.SaveAs("styled-sample.pdf")
Dim Renderer As New IronPdf.ChromePdfRenderer()
Renderer.RenderingOptions.PaperOrientation = IronPdf.Rendering.PdfPaperOrientation.Landscape
Renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print
Dim PDF As IronPdf.PdfDocument = Renderer.RenderUrlAsPdf("file://path-to-your-html-file.html")
PDF.SaveAs("styled-sample.pdf")
VB .NET
4. Create PDF w/ Dynamic Content: 2 Methods
Historically, PDF 'templating' has been an overwhelming task for Software Engineers. Stamping content into PDF templates rarely works because each case or report will contain content of varying types and lengths. Fortunately, HTML is exceptionally good at handling Dynamic Data.
4.1. Method 1 - ASP.NET - ASPX to PDF using VB.NET Web Forms
Any flavor of .NET Web Form (including Razor) can be rendered into a PDF document using this VB.NET code in the Page_Load subroutine in the VB.NET code behind.
ImportsIronPdfPrivate Sub Form1_Load(ByVal sender AsObject, ByVal e AsEventArgs) DimPdfOptions = New IronPdf.ChromePdfRenderOptions()IronPdf.AspxToPdf.RenderThisPageAsPDF(AspxToPdf.FileBehavior.Attachment, "MyPdf.pdf", PdfOptions)End Sub
Imports IronPdf
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim PdfOptions = New IronPdf.ChromePdfRenderOptions()
IronPdf.AspxToPdf.RenderThisPageAsPDF(AspxToPdf.FileBehavior.Attachment, "MyPdf.pdf", PdfOptions)
End Sub
VB .NET
4.2. Method 2 - HTML to PDF with String Templating
To create dynamic PDF documents that include instance-specific data, we simply create an HTML string to match the data we wish to render as a PDF.
ImportsIronPdfModuleModule1 Sub Main() Dim renderer = New ChromePdfRenderer() DimHtml = "Hello {0}"String.Format(Html, "World") Dim document = renderer.RenderHtmlAsPdf(Html) document.SaveAs("HtmlTemplate.pdf")System.Diagnostics.Process.Start("HtmlTemplate.pdf") End SubEndModule
Imports IronPdf
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim Html = "Hello {0}"
String.Format(Html, "World")
Dim document = renderer.RenderHtmlAsPdf(Html)
document.SaveAs("HtmlTemplate.pdf")
System.Diagnostics.Process.Start("HtmlTemplate.pdf")
End Sub
End Module
VB .NET
5. Edit PDF Files with VB.NET
IronPDF for VB.NET also allows PDF documents to be edited, encrypted, watermarked, or even turned back into plain text:
5.1. Merging Multiple PDF Files into One Document in VB
Dim pdfs = New List(OfPdfDocument)pdfs.Add(PdfDocument.FromFile("A.pdf"))pdfs.Add(PdfDocument.FromFile("B.pdf"))pdfs.Add(PdfDocument.FromFile("C.pdf"))Dim mergedPdf AsPdfDocument = PdfDocument.Merge(pdfs)mergedPdf.SaveAs("merged.pdf")mergedPdf.Dispose()For Each pdf AsPdfDocumentIn pdfs pdf.Dispose()Next
Dim pdfs = New List(Of PdfDocument)
pdfs.Add(PdfDocument.FromFile("A.pdf"))
pdfs.Add(PdfDocument.FromFile("B.pdf"))
pdfs.Add(PdfDocument.FromFile("C.pdf"))
Dim mergedPdf As PdfDocument = PdfDocument.Merge(pdfs)
mergedPdf.SaveAs("merged.pdf")
mergedPdf.Dispose()
For Each pdf As PdfDocument In pdfs
pdf.Dispose()
Next
// Savewith a strong encryption password.pdf.Password = "my.secure.password";pdf.SaveAs("secured.pdf")
// Save with a strong encryption password.
pdf.Password = "my.secure.password";
pdf.SaveAs("secured.pdf")
VB .NET
5.5. Stamp Additional HTML Content Onto a Page in VB
ImportsIronPdfImportsIronPdf.EditingModuleModule1 Sub Main() Dim renderer = New ChromePdfRenderer Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf") Dim stamp = New HtmlStamper() stamp.Html = "<h2>Completed</h2>" stamp.Opacity = 50 stamp.Rotation = -45 stamp.VerticalAlignment = VerticalAlignment.Top stamp.VerticalOffset = New Length(10) pdf.ApplyStamp(stamp) pdf.SaveAs("C:\Path\To\Stamped.pdf") End SubEndModule
Imports IronPdf
Imports IronPdf.Editing
Module Module1
Sub Main()
Dim renderer = New ChromePdfRenderer
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
Dim stamp = New HtmlStamper()
stamp.Html = "<h2>Completed</h2>"
stamp.Opacity = 50
stamp.Rotation = -45
stamp.VerticalAlignment = VerticalAlignment.Top
stamp.VerticalOffset = New Length(10)
pdf.ApplyStamp(stamp)
pdf.SaveAs("C:\Path\To\Stamped.pdf")
End Sub
End Module
You may also be interested in our extensive library of VB.NET PDF generation and manipulation examples on GitHub. Exploring source code is the fastest way to learn, and Github is the definitive way to do so online. I hope these examples help you get to grips with PDF related functionality in your VB projects.
To make developing PDFs in your .NET applications easier, we have compiled a quick-start guide as a PDF document. This "Cheat-Sheet" provides quick access to common functions and examples for generating and editing PDFs in C# and VB.NET - and will save time getting started using IronPDF in your .NET project.
IronPDF is a library used to create and edit PDF files in VB.NET. It supports rendering HTML to PDFs, applying styles, and editing content, making it useful for a variety of .NET applications.
How can I install IronPDF in a VB.NET project?
You can install IronPDF in a VB.NET project via NuGet by searching for 'IronPDF' in the 'Manage NuGet Packages' dialog within Visual Studio. Alternatively, you can download the DLL and manually add it to your project.
Can IronPDF be used with .NET Core projects?
Yes, IronPDF is compatible with .NET Core as well as .NET Framework projects, starting from .NET Framework 4.6.2 and .NET Core 2.
What types of applications can integrate IronPDF?
IronPDF can be integrated into various application types including ASP.NET web apps, console applications, Windows Services, and desktop programs.
Is it possible to customize PDF document styles using IronPDF?
Yes, you can customize PDF styles using CSS and JavaScript. IronPDF supports styling in this manner, allowing for comprehensive customization of the PDF appearance.
Does IronPDF support merging multiple PDF files?
Yes, IronPDF allows you to merge multiple PDF files into a single document using its library functions.
Can I render a web page to a PDF using VB.NET and IronPDF?
Yes, IronPDF can render an entire web page to a PDF using its 'RenderUrlAsPdf' method in VB.NET.
What is the recommended method for generating dynamic PDFs in VB.NET?
Creating dynamic PDFs is best achieved by using HTML to define content and data bindings within your VB.NET application executed with IronPDF.
How do I apply a watermark to a PDF using IronPDF?
You can apply a watermark by stamping additional HTML content onto a page with IronPDF's editing capabilities.
Is IronPDF free to use for development purposes?
Yes, IronPDF offers unlimited free development, allowing you full access to its features prior to going live with your application.
Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.