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
Image: Insert Image to PDF
  |  
Home ›› XDoc.PDF ›› VB.NET PDF: Insert Image to PDF Page

VB.NET PDF - Add Image to PDF Page in VB.NET


Guide VB.NET Programmers How to Add Images in PDF Document Using XDoc.PDF SDK for VB.NET




Free VB.NET PDF SDK library for processing PDF image in Visual Studio VB.NET program


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


Support various image formats, like Jpeg or Jpg, Png, Gif, Bmp, Tiff and other bitmap images


Create high resolution PDF file without image quality losing in .NET WinForms application


Insert single or multiple images or graphics to PDF document


Enable users to insert images to PDF file in ASPX webpage project


Import graphic picture, digital photo, signature and logo into PDF document


Add images to any selected PDF page in VB.NET


Ability to put image into defined location on PDF page


Provide image attributes adjust functionalities, such as resize image by zooming and cropping


Save changes to existing PDF file or output a new PDF file


Insert images into PDF form field in VB.NET


An independent .NET framework component supports inserting image to PDF in preview without adobe PDF control installed


Access to freeware download and online VB.NET class source code


This smart and mature PDF image adding component of RasterEdge VB.NET PDF document processing SDK is an independent PDF handling application in high level. It has been perfectly programmed to provide users the most individualized PDF page image inserting function, allowing developers to add and insert single or a couple of images or graphics of specific format, such as Png, Gif and TIFF, to any selected PDF page with your defined location. Once the photo is inserted, its attributes, for instance, appearance and position, can be totally adjusted and readjusted before saving the PDF file with simple Visual Basic .NET codes.


With powerful VB PDF image compressing techniques, our PDF document also implements several international image compression mechanisms for embedding image, users are completely free to specify any compression model manually or leave it to the assembly program to decide.


Additionally, this PDF document image inserting toolkit in VB.NET still offers users the capabilities of burning and merging the added image with source PDF page for better storage and further viewing.




Insert Image to PDF Page Using VB



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;


Have a try with this sample VB.NET code to add an image to the first page of PDF file.




' Open a document.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Get a text manager from the document object.
Dim textMgr As PDFTextMgr = PDFTextHandler.ExportPDFTextManager(doc)

' Get the first page from the document.
Dim pageIndex As Integer = 0
Dim page As PDFPage = doc.GetPage(pageIndex)

' Select char at position (127F, 187F).
Dim cursor As PointF = New PointF(127.0F, 187.0F)
Dim aChar As PDFTextCharacter = textMgr.SelectChar(page, cursor)

' Delete a selected character.
textMgr.DeleteChar(aChar)

' Output the new document.
Dim outputFilePath As String = Program.RootPath + "\\" + "output.pdf"
doc.Save(outputFilePath)