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 - Replace PDF pages in VB.NET


Replace the Original PDF Page with New PDF Page from Another PDF File 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.


Advanced PDF edit control for replacing PDF page in Visual Basic .NET framework


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


Able to replace all PDF page contents in VB.NET, including text, image, hyperlinks, etc


Professional VB.NET component to replace a PDF page with another PDF file page


Support to save multiple PDF pages to anther adobe PDF document by replacing


Free .NET evaluation SDK library easy to be integrated in .NET WinForms and ASP.NET project


Online source code for quick integration in VB.NET program


You can replace an entire PDF page with another PDF page from another PDF file. All information, data on the original page are removed, including text, images, interactive elements, such as links and bookmarks.




VB.NET: Replace a Page (in a PDFDocument Object) by a PDF Page Object



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;


You are able to replace a PDF page with PDF page from other PDF file using VB.NET programming language.




' load the PDF file that provides the page object 
Dim resFilePath As String = Program.RootPath + "\\" + "2.pdf"
Dim resDoc As PDFDocument = New PDFDocument(resFilePath)
' get the 1st page in the document
Dim page As PDFPage = resDoc.GetPage(0)

' get PDFDocument object from a source file
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)
' replace the 3rd page by the PDFPage object
Dim pageIndex As Integer = 2
doc.UpdatePage(page, pageIndex)

' save the PDFDocument
Dim outputFilePath As String = Program.RootPath + "\\" + "Output.pdf"
doc.Save(outputFilePath)