Frequently Asked Question:
Can’t do imposition due to \Rotate command in source PDF
I'm trying to test some impositions task(version activeX 7.25 in C#). But have some problem with Rotated files. The file views correctly in Landscape on screen, but have a Portrait orientation within with \Rotate 90 command. So I'm can set rotate to "0" but file stays in Portrait orientation(so QuickPDF reports that width < height). So while imposing I'm should rotate it Back, but I'm can't understand how to do it? Any Ideas?
My solution comes in Delphi, but it should be no problem.
I made for test a PDF which contains an image and has inside the /Rotate 90-Command. So QuickPDF and Adobe show it rotated.
It's only a question of right order to get it back shown under 0 degrees.
QP.LoadFromFile(filename);
QP.SelectPage(1); // select first page
QP.RotatePage(0); // turn page one back to zero degrees
A render-operation after this shows the sourcefile in its old orientation. If the file will be saved, you find that the rotation-command is set back to /Rotate 0 in your PDF.
Remember, that width and height are properties of the original PDF and it seems they will ever be reported, as there would be no /Rotate-instruction. With PageRotation you may get the angle, under which the page is rotated. Having this angle, width and height you have all needed information.