ByteScout Premium Suite - C# - Add Image Stamp in PDF with PDF Extractor SDK - ByteScout

ByteScout Premium Suite – C# – Add Image Stamp in PDF with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Add Image Stamp in PDF with PDF Extractor SDK

How to add image stamp in PDF with PDF extractor SDK in C# using ByteScout Premium Suite

Continuous learning is a crucial part of computer science and this tutorial shows how to add image stamp in PDF with PDF extractor SDK in C#

The documentation is designed for a specific purpose to help you to apply the features on your side. 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 C#.

Want to quickly learn? This fast application programming interfaces of ByteScout Premium Suite for C# plus the guidelines and the code below will help you quickly learn how to add image stamp in PDF with PDF extractor SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Further improvement of the code will make it more robust.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System.Diagnostics; using System.Drawing; using Bytescout.PDFExtractor; namespace AddImageStampInPDF { class Program { static void Main(string[] args) { string inputFile = @".\Invoice.pdf"; string outputFile = @".\Invoice_Stamped.pdf"; string stampImageFile = @".\stamp_image.png"; using (Stamper stamper = new Stamper("demo", "demo")) { // Optionally make the image background transparent // stamper.MakeStampImageTransparent = true; using (Image image = Image.FromFile(stampImageFile)) { // Get image size in PDF units SizeF imageSizeInPoints = stamper.GetImageSizeInPoints(image); RectangleF rectangle = new RectangleF(440, 370, imageSizeInPoints.Width / 3, imageSizeInPoints.Height / 3); stamper.Stamp(inputFile, outputFile, image, rectangle, 0, -1); } } // Open first output file in default associated application (for demo purposes) ProcessStartInfo processStartInfo = new ProcessStartInfo(outputFile); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next