iTextSharp.text.pdf.PdfCopy.PageStamp.ApplyRotation C# (CSharp) Метод

ApplyRotation() приватный Метод

private ApplyRotation ( PdfDictionary pageN, ByteBuffer out_p ) : void
pageN PdfDictionary
out_p ByteBuffer
Результат void
            void ApplyRotation(PdfDictionary pageN, ByteBuffer out_p)
            {
                if (!cstp.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;
                }
            }