ByteScout Watermarking SDK - C# - Add Advanced Text Watermark - 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 Watermarking SDK – C# – Add Advanced Text Watermark

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – C# – Add Advanced Text Watermark

How to add advanced text watermark for text fits page in C# with ByteScout Watermarking SDK

Tutorial: how to add advanced text watermark for text fits page in C#

Today we will explain the steps and algorithm of how to add advanced text watermark and how to make it work in your application. ByteScout Watermarking SDK helps with text fits page in C#. ByteScout Watermarking SDK is the software development kit that helps to quickly implement adding of watermarks on top of PNG, JPG, BMP images as well as on multipaged TIFF files. You may select ready to use presets or create your own preset with semitransparent logo images, text lines with adjustable font size, family, color, rotation.

C# code samples for C# developers help to speed up the application’s code writing when using ByteScout Watermarking SDK. Open your C# project and simply copy & paste the code and then run your app! Test C# sample code examples whether they respond your needs and requirements for the project.

Our website provides free trial version of ByteScout Watermarking SDK that includes source code samples to help with your C# project.

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; using System.Diagnostics; using System.Drawing; using System.Collections.Generic; using Bytescout.Watermarking; using Bytescout.Watermarking.Presets; namespace Sample { class Program { static void Main(string[] args) { // Create Watermarker instance Watermarker waterMarker = new Watermarker(); // Initialize library waterMarker.InitLibrary("demo", "demo"); // Set input file name string inputFilePath = "my_sample_image.jpg"; // Set output file title string outputFilePath = "my_sample_output.jpg"; // Add image to apply watermarks to waterMarker.AddInputFile(inputFilePath, outputFilePath); // Create new watermark TextFitsPage preset = new TextFitsPage(); // Set watermark text preset.Text = "Bytescout Watermarking"; // Set watermark font preset.Font = new WatermarkFont("Tahoma", FontStyle.Regular, FontSizeType.Points, 30); // Set watermark text color preset.TextColor = Color.Black; // Set text transparency preset.Transparency = 40; // Add watermark to watermarker waterMarker.AddWatermark(preset); // Set output directory waterMarker.OutputOptions.OutputDirectory = "."; // Set output format waterMarker.OutputOptions.ImageFormat = OutputFormats.JPEG; // Apply watermarks waterMarker.Execute(); // open generated image file in default image viewer installed in Windows Process.Start(outputFilePath); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Watermarking SDK Home Page

Explore ByteScout Watermarking SDK Documentation

Explore Samples

Sign Up for ByteScout Watermarking SDK 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 Watermarking SDK Home Page

Explore ByteScout Watermarking SDK Documentation

Explore Samples

Sign Up for ByteScout Watermarking SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next