How can we rotate a PDF?

uiautomation
pdf
activities

#1

where few of the pages in the PDF are not in a valid rotation angle.
Can anyone help me in finding the solution.


#2

Hi there @sathishkumar191991,
You could use image recognition to identify a common element across all pages, but at the correct angle.

Then for each page you work through, check for that image inside a loop, iterating four 4 times, with an activity to rotate the page.

Something like:
Assign - x = 0
Image Exists - Some Header Consistent Across All Pages At The Right Angle - Output = boolImageExists
While boolImageExists = False And x < 4 Then
* Click - Rotate
*Image Exists - Some Header Consistent Across All Pages At The Right Angle - Output = boolImageExists
* Assign - x = x + 1
End While
If boolImageExists = False Then
* Throw
End If


#3

@Mr_JDavey thanks for the update ,PDF Pages or not consistent , they don’t have images in all the pages.
In one of the article they said we can use send hot keys for rotation ,Do you know how to do it ?


#4

Hi there @sathishkumar191991,
Depending on the application used to view the PDF, you should be able to find their relevant hotkeys online.

For example, Adobe Acrobat uses:

  • Ctrl + Shift + + = rotate clockwise

Available at:
http://allhotkeys.com/adobe_acrobat_reader_hotkeys.html

You would need to launch the PDF, rotate any pages, then save it.

Thanks,
Josh


#5

@Mr_JDavey Any articles on rotating a PDF using send hot keys.


#6

Hi there @sathishkumar191991,
I’m not sure on any articles, you should be able to simply launch your preferred PDF reader, move to the required page, then use send hotkeys.


Thanks,
Josh