internal void ApplyRotation(PdfDictionary pageN, ByteBuffer out_p)
{
if (!rotateContents)
return;
Rectangle page = reader.GetPageSizeWithRotation(pageN);
int rotation = page.Rotation;
switch (rotation) {
case 90:
out_p.Append(PdfContents.ROTATE90);
out_p.Append(page.Top);
out_p.Append(' ').Append('0').Append(PdfContents.ROTATEFINAL);
break;
case 180:
out_p.Append(PdfContents.ROTATE180);
out_p.Append(page.Right);
out_p.Append(' ');
out_p.Append(page.Top);
out_p.Append(PdfContents.ROTATEFINAL);
break;
case 270:
out_p.Append(PdfContents.ROTATE270);
out_p.Append('0').Append(' ');
out_p.Append(page.Right);
out_p.Append(PdfContents.ROTATEFINAL);
break;
}
}