Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
\n
and <br>
but these types of characters are not supported by Aspose.Pdf.Facades namespace. So, to make it possible, we have added another method named AddNewLineText() in FormattedText class of Aspose.Pdf.Facades namespace.
Please refer to the following code chunk to add multi-line watermark in existing PDF.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void AddTextStampToPdf()
{
// Instantiate a stamp object
var logoStamp = new Aspose.Pdf.Facades.Stamp();
// Instantiate an object of FormattedText class
var formatText = new Aspose.Pdf.Facades.FormattedText("Hello World!",
System.Drawing.Color.FromArgb(180, 0, 0),
Aspose.Pdf.Facades.FontStyle.TimesItalic,
Aspose.Pdf.Facades.EncodingType.Winansi, false, 50);
// Add another line for Stamp
formatText.AddNewLineText("Good Luck");
// BindLogo to PDF
logoStamp.BindLogo(formatText);
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.