Can you confirm that the following code snippet does’t work in Aspose.Pdf for .NET 11.4.0:
TextStamp textStamp = new TextStamp("[TEST]")
{
Background = false, //set whether stamp is background
XIndent = 15, //set origin
YIndent = 15,
Rotate = Rotation.on90 //rotate stamp
};
//set text properties
textStamp.TextState.Font = FontRepository.FindFont(“Tahoma”);
textStamp.TextState.FontSize = 14.0F;
textStamp.TextState.FontStyle = FontStyles.Bold;
textStamp.TextState.FontStyle = FontStyles.Italic; // cause of IndexOutOfRangeException
textStamp.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Red);
//add stamp to particular page
foreach (Page page in aPdfDocument.Pages)
{
page.AddStamp(textStamp); // IndexOutOfRangeException
}
Thanks in advance
Alex
Hi Alex,
The issues you have found earlier (filed as PDFNET-40519) have been fixed in Aspose.PDF for .NET 24.2.