XDoc.PDF
Features
Tech Specs
How-to VB.NET
Pricing
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

VB.NET PDF - Remove Image from PDF Page in VB.NET


Provide VB.NET Demo Code for Deleting and Removing Image from PDF File Page in VB.NET





Look for HTML5 PDF Editor?

EdgePDF: ASP.NET PDF Editor is the best HTML5 PDF Editor and ASP.NET PDF Viewer based on XDoc.PDF, JQuery, HTML5. It supports ASP.NET MVC and WebForms projects.


Powerful PDF image editor control, compatible with .NET framework 2.0+ and Visual Basic


Support various formats image deletion in Visual Studio, such as Jpeg or Jpg, Png, Gif, Bmp, Tiff and other bitmap images


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


Support removing vector image, graphic picture, digital photo, scanned signature, logo, etc


Remove multiple or all image objects from PDF document in .NET WinForms


Delete image objects in selected PDF page in ASPX webpage


Define position to remove a specific image from PDF document page in VB.NET class


Remove PDF image in preview without adobe PDF reader component in VB.NET program


Free .NET PDF SDK library download and online VB.NET class source code are accessible


Except PDF text processing function, RasterEdge XDoc.PDF for .NET has image management features, which provide developers with various methods to obtain and delete image objects included in Adobe PDF document. Using well-designed image removing API, VB.NET developers can do following things.


Additionally, if you want to read the tutorial of removing image from PDF page in C# class, we suggest you go to C# Imaging - how to remove image from PDF file.




VB.NET: Remove Image from PDF Page



Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Raster.dll


  RasterEdge.XDoc.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.PDF;


This complete example describes how to use VB.NET demo code extract all images and delete them all from PDF document.




Dim inputFilePath As String = Program.RootPath + "\\" + "3.pdf"
Dim outputFilePath As String = Program.RootPath + "\\" + "output.pdf"

' Open a PDF document.
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Extract all images from the document.
Dim allImages = PDFImageHandler.ExtractImages(doc)

' Delete all images from the document.
For Each image As PDFImage In allImages
    PDFImageHandler.DeleteImage(doc, image)
Next

' Output the new PDF document.
doc.Save(outputFilePath)