I've attached a junk PDF with three pages.
The second page has a rotation of 90 degrees. On this page the page width is 612 and the height is 792. If I try to stamp text with a y coordinate greater than 612 the text is cut off even though the page height is actually 792.
- - -
Aspose.Pdf.Kit.PdfFileInfo PdfFileInfo = new Aspose.Pdf.Kit.PdfFileInfo("...test.pdf");
int pagecount = PdfFileInfo.NumberofPages;
Aspose.Pdf.Kit.PdfFileStamp stamper = new Aspose.Pdf.Kit.PdfFileStamp("...test.pdf", "...outputStamp.pdf");
Aspose.Pdf.Kit.FormattedText formText = new Aspose.Pdf.Kit.FormattedText("TEST Text", Color.AntiqueWhite, Color.Red);
float textWidth = formText.TextWidth;
float textHeight = formText.TextHeight;
for (int i = 1; i <= pagecount; i++)
{
Aspose.Pdf.Kit.Stamp stamp = new Aspose.Pdf.Kit.Stamp();
stamp.BindLogo(formText);
if (PdfFileInfo.GetPageRotation(i) == 90)
{
stamp.SetOrigin(PdfFileInfo.GetPageWidth(i) - 10 - textWidth, 610);
}
else
{
stamp.SetOrigin(PdfFileInfo.GetPageWidth(i) - 10 - textWidth, PdfFileInfo.GetPageHeight(i) - 10 - textHeight);
}
stamp.Pages = new int[] { i };
stamper.AddStamp(stamp);
}
stamper.Close();