Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
\n
y <br>
, pero estos tipos de caracteres no son compatibles con el espacio de nombres Aspose.Pdf.Facades. Por lo tanto, para hacerlo posible, hemos agregado otro método llamado AddNewLineText() en la clase FormattedText del espacio de nombres Aspose.Pdf.Facades.
Por favor, consulta el siguiente bloque de código para agregar una marca de agua de varias líneas en un PDF existente.
// 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.