ByteScout simple and easy to understand tutorials are planned to describe the code for both VB.NET beginners and advanced programmers. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can add image stamp in pdf with pdf extractor sdk in VB.NET.
Want to quickly learn? This fast application programming interfaces of ByteScout Premium Suite for VB.NET plus the guidelines and the code below will help you quickly learn how to add image stamp in pdf with pdf extractor sdk. IF you want to implement the functionality, just copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Use of ByteScout Premium Suite in VB.NET is also described in the documentation included along with the product.
The trial version of ByteScout Premium Suite can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.
Imports System.Drawing Imports Bytescout.PDFExtractor Namespace AddImageStampInPDF Class Program Shared Sub Main(ByVal args As String()) Dim inputFile As String = ".\Invoice.pdf" Dim outputFile As String = ".\Invoice_Stamped.pdf" Dim stampImageFile As String = ".\stamp_image.png" Using stamper As New Stamper("demo", "demo") ' Optionally make the image background transparent ' stamper.MakeStampImageTransparent = true Using image As Image = Image.FromFile(stampImageFile) ' Get image size in PDF units Dim imageSizeInPoints As SizeF = stamper.GetImageSizeInPoints(image) Dim Rectangle = New RectangleF(440, 370, imageSizeInPoints.Width / 3, imageSizeInPoints.Height / 3) stamper.Stamp(inputFile, outputFile, image, Rectangle, 0, -1) End Using End Using ' Open result file in default associated application (for demo purposes) Process.Start(outputFile) End Sub End Class End Namespace