Hi,
Iam Unable to add Watermark Text in PDF Diagonally. Iam able to add Horizontally.
Here is my code:
Aspose.Pdf.Facades.Stamp aStamp = new Aspose.Pdf.Facades.Stamp();
aStamp.Rotation = 45;
TextStamp textStamp = new TextStamp(allowwatermark);
//set properties of the stamp
// textStamp.Background = true;
textStamp.Opacity = 0.2;
textStamp.TextState.FontSize = 60.0F;
textStamp.HorizontalAlignment = HorizontalAlignment.Center;
textStamp.VerticalAlignment = VerticalAlignment.Center;
textStamp.RotateAngle =aStamp.Rotation;
textStamp.TextState.Font = FontRepository.FindFont(“Arial”);
textStamp.TextState.ForegroundColor = Aspose.Pdf.Color.Gray;
// Adds Watermark in Page 1
//pdfDocument.Pages[1].AddStamp(textStamp);
//Adds Watermark in all Pages
foreach (Page page in pdfDocument.Pages)
{
page.AddStamp(textStamp);
}
Thanks and Regards,
S.Saritha