I read in PDF via iText. How can I check if the orientation of the first page is in landscape or portrait mode?
Try getPageRotation() in combination with getPageSize()
getPageRotation()
getPageSize()
I use this and it seems to work well.
Rectangle rectangle = pdfReader.getPageSizeWithRotation(pageNumber); if(rectangle.getHeight() >= rectangle.getWidth()) return PageFormat.PORTRAIT; else return PageFormat.LANDSCAPE;