The wait is over! GroupDocs.Watermark for .NET 24.2 (DLLs only package) is here, and it brings a groundbreaking feature: tiled watermarks for PDF documents. With this update, developers can generate secure and catchy PDF documents on Windows, Linux, and macOS.
Implement Tiled Watermarks
Add repeated watermarks on PDFs for a visually appealing presentation with this C# watermarking API release. You can seamlessly customize spacing and rotation for precise control, 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*
Offset Tile Support
Create unique and eye-catching tiled watermarks with offset positioning in your PDFs with the .NET API. Check out the code example below to learn how to add this functionality to your cross-platform 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*
Refined Tiled Watermark Control
GroupDocs.Watermark for .NET 24.2 allows you to fine-tune line spacing and watermark spacing between each line using percentages or pixels for optimal placement.
Add Watermarks using Images or Text
Utilize either text or images for your tiled watermarks and enjoy maximum flexibility in document branding with the newest version of the .NET API.
Future-Proof for Expansion
Support for tiled watermarks in various document formats is being actively developed. The future version of GroupDocs.Watermark for .NET 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.