Hi,
Hi,
//open document
Document pdfDocument1 = new Document(myDir + "Test.pdf");
var textStamp = new Aspose.Pdf.TextStamp("Aspose.Pdf for .NET stamping test")
{
Background = false,
Opacity = 0.5,
//RotateAngle = 50,
HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Center,
VerticalAlignment = Aspose.Pdf.VerticalAlignment.Center,
TextAlignment = Aspose.Pdf.HorizontalAlignment.Center
};
textStamp.TextState.Font = FontRepository.FindFont("Arial");
textStamp.TextState.FontSize = 16.0f;
textStamp.TextState.FontStyle = FontStyles.Bold;
textStamp.TextState.FontStyle = FontStyles.Italic;
textStamp.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.FromArgb(121, 177, 0));
for( int pageno=1;pageno<=pdfDocument1.Pages.Count;pageno++)
pdfDocument1.Pages[pageno].AddStamp(textStamp);
pdfDocument1.Save(myDir + "testout_stamp.pdf");
Please feel free to contact us for any further assistance.
Best Regards,