0

i am trying to merge two PDF documents. when i looking for sample codes, some of those contain GetPageRotation() function. what is meant by GetPageRotation() function or what action is take place when we call this function?

2 Answers2

0

The page size is defined in user units. For instance: an A4 page measures 595 x 842 user units. There are different ways to define the orientation. If you want to change a portrait page to a landscape page, you could switch the width and the height: 842 x 595. However, that's not very elegant. It's much better to set the page rotation. As defined in ISO-32000, there are 4 possible values for the page rotation: 0, 90, 180, 270. See also: iTextSharp how to rotate/switch page from landscape to portrait

However, if you want to merge two document, you shouldn't worry about the page rotation. The PdfCopy and PdfSmartCopy class takes care of getting the page rotation correctly. If you really need GetPageRotation() to merge two PDF files, then you are doing it wrong. See How to merge documents correctly?

Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165
0

getPageRotation(int index)

It gets the page rotation.

I have find all methods & Description of itextpdf.text.pdf on itextsupport.com

Arvind Sisara
  • 861
  • 2
  • 7
  • 13