ByteScout PDF Suite - C# - Add Image Stamp in PDF with PDF Extractor SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF 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 PDF Suite

Step-by-step tutorial on how to add image stamp in PDF with PDF extractor SDK in C#

Quickly learn how to add image stamp in PDF with PDF extractor SDK in C# with this sample source code. ByteScout PDF Suite: the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can add image stamp in PDF with PDF extractor SDK in C#.

The following code snippet for ByteScout PDF Suite works best when you need to quickly add image stamp in PDF with PDF extractor SDK in your C# application. Follow the instructions from scratch to work and copy the C# code. Further improvement of the code will make it more robust.

ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and source code samples.

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 PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF 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 PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next