Let me give you an overview of my project first. I have a pdf which I need to convert into images(One image for one page) using PDFBox API and write all those images onto a new pdf using PDFBox API itself. Basically, converting a pdf into a pdf, which we refer to as PDF Transcoding.
Now, I have some cases wherein eveyrthing goes fine, i.e. the transcoded pdf exactly matches the original pdf contents, but just 1/10 cases are like, the dimensions of transcoded pdf is getting swapped somehow. For example, original pdf- 8.2 x 11.2 transcoded pdf- 11.2 x 8.2. In short, height is getting swapped with width. I don't know why this API is behaving differently for different files. If anyone could answer the same?
Thanks in advance, Vaibhav
PDPage pageusingpage.findRotation(). In essence it returns the value of the Rotate key of the page or (if not found there) its ancestors in the page tree. - mkl