Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
\n
и <br>
, но такие символы не поддерживаются пространством имен Aspose.Pdf.Facades. Поэтому, чтобы сделать это возможным, мы добавили еще один метод под названием AddNewLineText() в класс FormattedText пространства имен Aspose.Pdf.Facades.
Пожалуйста, обратитесь к следующему коду, чтобы добавить многострочный водяной знак в существующий 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.