How to Start Convert PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

PDF VB.NET Library
How to remove PDF pages in VB.NET code?


Visual Basic .NET Sample Codes to Delete PDF Document Page in VB.NET Class







In this Visual Basic .NET tutorial, you will learn how to remove PDF pages programmatically using VB.NET

  • Remove a PDF page, a list of pages from PDF
  • Remove a list of specified pages
  • Remove consecutive pages

How to remove PDF pages programmatically using VB.NET

  1. Download XDoc.PDF VB.NET library
  2. Install VB library to remove Adobe PDF pages programmatically
  3. Step by Step Tutorial










  • Free PDF edit control and component for deleting PDF pages in Visual Basic .NET framework application
  • For C# .NET developers: How to delete, remove pages from PDF file using C#
  • Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint
  • Easy to delete PDF page in .NET WinForms application and ASPX webpage
  • Able to remove a single page from adobe PDF document in VB.NET
  • Ability to remove consecutive pages from PDF file in VB.NET
  • Enable specified pages deleting from PDF in Visual Basic .NET class
  • Free trial SDK library download for Visual Studio .NET program
  • Online source codes for quick evaluation in VB.NET class


If you are looking for a solution to conveniently delete one page from your PDF document, you can use this VB.NET PDF Library, which supports a variety of PDF file editing features including deleting page using Visual Basic .NET programming language. This library is written in VB.NET code for compatibility in .NET development environment such as Microsoft Visual Basic 2005 / 2008 / 2010 / 2012 version.

pdf viewer for asp.net web application, asp.net mvc pdf editor, asp.net mvc open word document in browser, asp net remove text from pdf javascript, best pdf preview in asp net c#, asp.net itextsharp add image to pdf, pdf viewer in mvc 4.

With this RasterEdge XDoc.PDF SDK, you can simply delete a single page from a PDF document using VB.NET or remove any page from a PDF document and save to local file for further processing. This page is aimed to help you learn how to delete page from your PDF document in VB.NET application. Please follow the sections below to learn more.







How to remove a page from pdf file in VB.NET code?


You can easily remove a PDF page using VB.NET code. Below are the steps and VB.NET sample source code to remove a page from PDF.

  • Define a PDFDocument object with an existing PDF file loaded
  • Call method PDFDocument.DeletePage() to remove the 3rd page of the PDF document
  • Save the modified PDF file to a new location



' get PDFDocument object from a source file
Dim inputFilePath As String = "C:\1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' delete the 3rd page
Dim pageIndex As Integer = 2
doc.DeletePage(pageIndex)

' save the PDFDocument
Dim outputFilePath As String = "C:\Output.pdf"
doc.Save(outputFilePath)






How to remove continuous pages from pdf file in VB.NET application


You can also remove continuous pages from PDF file at the same time using VB.NET. Below are the steps and Visual Basic .NET example source code to remove three continuous pages from a PDF file.

  • Create a PDFDocument object with an existing PDF file loaded
  • Call PDFDocument.DeletePages() method to remove a series of 3 pages, starting from the second page
  • Save the updated PDF document to a new PDF file



' get PDFDocument object from a source file
Dim inputFilePath As String = "C:\1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' detele consecutive 3 pages from the 2nd page
Dim pageIndex As Integer = 1
Dim pageCount As Integer = 3
doc.DeletePages(pageIndex, pageCount)

' save the PDFDocument
Dim outputFilePath As String = "C:\Output.pdf"
doc.Save(outputFilePath)






How to remove list of specific PDF pages in Visual Basic .NET?


You can also remove a list of specific pages from PDF file in VB.NET. Below are the steps and VB sample code to remove five specific pages from PDF document.

  • Create a PDFDocument object with a PDF file loaded
  • Define an Integer array, which contains PDF page index 1, 3, 5, 7, 9. (The first PDF page index is 0)
  • Call method PDFDocument.DeletePages() to remove 5 pages from pdf
  • Save the PDF file to a new location



' get PDFDocument object from a source file
Dim inputFilePath As String = "C:\1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' delete 5 pages by their page indexes
Dim pageIndexes As Integer() = New Integer() {1, 3, 5, 7, 9}
' delete pages
doc.DeletePages(pageIndexes)

' save the PDFDocument
Dim outputFilePath As String = "C:\Output.pdf"
doc.Save(outputFilePath)