How to use activities or .Net code to detect the PDF's orientation?

Hi everyone,

I was wondering what can i do to let my process to detect the orientation of the PDF I choose. Should I use .Net code or activities to do this?

I just saw an article in the forum but i didn’t know which package i should use actually.
the pdf’s orientation question

Hi @jojo11050702 ,
I think we can use hot key with abode
We can open PDF file by adobe then use send hot key activity
link key for you :All hotkeys - Adobe Acrobat Reader Hotkeys
For example, Adobe Acrobat uses:

  • Ctrl + Shift + + = rotate clockwise
    regards,

Hi,

you could try also powershell to do it. Below you can find link with explanation.

Rotate a PDF using Powershell and iTextSharp - Stack Overflow

For Prototypes (recommended to advanced it, when the approach is selected)

assumption:

  • UiPath.PDF.Activities is referenced
myPDFDoc = new BitMiracle.Docotic.Pdf.PdfDocument("PDFFullFilePath")

The Page Orientiation is at Pagelevel, so we can check a particular page or select the info for all pages:

grafik

We did a string catch to freeze it from the enum relation (just to simplify it)

1 Like

Thanks everyone, i used itextsharp to solve my problem.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.