This update to GroupDocs.Watermark for .NET (v24.2, MSI) introduces a highly anticipated feature: the ability to create tiled watermarks in PDF documents. Using this feature, you can create visually appealing PDF documents, that securely reflect your branding.
Effortlessly Add Tiled Watermarks
Enhance document aesthetics with repeated watermarks on PDFs using the latest C# watermarking API release. It allows developers to customize spacing and rotation for precise control and a unique look, as depicted in the following C# code example.
using (Watermarker watermarker = new Watermarker("test.pdf", new PdfLoadOptions()))
{
// Create a text watermark with a specified text and font
var watermark = new TextWatermark("watermark", new Font("Arial", 48));
// Configure TileOptions
watermark.TileOptions = new TileOptions()
{
LineSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Percent,
Value = 12
},
WatermarkSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Percent,
Value = 10
},
};
watermark.Opacity = 0.3;
watermark.RotateAngle = -30;
// Add the text watermark with additional options
PdfArtifactWatermarkOptions textWatermarkOptions = new PdfArtifactWatermarkOptions();
watermarker.Add(watermark, textWatermarkOptions);
// Save the watermarked document and capture the watermarking result
WatermarkResult watermarkResult = watermarker.Save("result.pdf");
}
Source*
Support for Offset Tiles
Unleash creativity with offset tiled watermarks, enabling visually striking and asymmetrical arrangements in your PDF documents. Check out the code example below to learn how to add this functionality to your C# applications.
using (Watermarker watermarker = new Watermarker("test.pdf", new PdfLoadOptions()))
{
// Create an image watermark with a specified text and font
var watermark = new ImageWatermark(imagePath);
watermark.TileOptions = new TileOptions()
{
TileType = TileType.Offset,
LineSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Pixel,
Value = 100
},
WatermarkSpacing = new MeasureValue()
{
MeasureType = TileMeasureType.Pixel,
Value = 150
},
};
watermark.Opacity = 0.3;
watermark.RotateAngle = 45;
// Add the text watermark with additional options
PdfArtifactWatermarkOptions textWatermarkOptions = new PdfArtifactWatermarkOptions();
watermarker.Add(watermark, textWatermarkOptions);
// Save the watermarked document and capture the watermarking result
WatermarkResult watermarkResult = watermarker.Save("result.pdf");
}
Source*
Control Tiled Watermark Layout
GroupDocs.Watermark for .NET 24.2 lets you fine-tune line spacing and watermark spacing between each line using percentages or pixels for optimal placement.
Image or Text Watermarks
You can now choose between using images or simple text while applying tiled watermarks with the .NET API for maximum versatility in your document branding.
Expanded Support
We are actively developing support for tiled watermarks in various document formats. The future GroupDocs.Watermark for .NET versions will include support for more file formats, in addition to the PDF format. Stay tuned for future updates!
You can view the list of all new features, enhancements, and bug fixes introduced in this release by visiting GroupDocs.Watermark for .NET 24.2 Release Notes.