Quest Pdf Watermark 'link' Link
To implement a , you must first understand the concept of Layers . In QuestPDF, elements are rendered in the order they are defined. If you place text and then an image, the image appears on top of the text.
void ComposeImageWatermark(IContainer container) { // Load your image (ensure the file exists in your bin directory or use a stream) var imageData = File.ReadAllBytes("logo.png"); container .AlignCenter() .AlignMiddle() .Width(150) // Set a fixed width for the watermark .Opacity(0.2f) // Make the image semi-transparent .Image(imageData); quest pdf watermark
Before diving into the "how," we need to define the "what." The term generally refers to the process of adding a superimposed mark (text, logo, or pattern) onto a PDF document to establish ownership, claim copyright, or indicate status (e.g., "Confidential," "Draft," "Sample"). To implement a , you must first understand