Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

Method to rotate a PDF CLOSE to completion!

How hard should I work to make this happen?  I think I found a way... Should I write it up?


Accepted Solutions

I bailed on this.  Its not happening.  Too much effort.

View solution in original post

Community Support
Community Support

Hi @martinav ,

Yeah. Thanks for your sharing firstly.

I think the solution you provided here would help many other users within this forum. I would also share this method to my colleagues.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft ,


Its NOT pretty...  it involves doing some crazy base64 conversions and edits (is MS Flow) to change '/rotate 0/' to '/rotate 90/'.  Its gotten VERY complicated.  Its not quite working yet, and its exceedingly slow, because you have to do a "do until" loop to find the index of where its located in the base 64 file.  Being that base64 works in 4 character chunks, its really messy.  I had to put it aside for now.  


Steps to completion:

  1. Find '/rotate 0/' in the base64 code (done)
  2. Find the index of the full block of base64 code that contains the '/rotate 0/' code. (done)
  3. strip off any extra characters from the last block (working on this now)
  4. Replace '/rotate 0/' with '/rotate 90/' in a full block (done)
  5. piece together new first half of the file with the 2nd half of the file (done)

I was so close when I realized I was losing data from the last block when '/rotate 0/' only filled part of the last block.


I cant believe how complex it has gotten.  Its like 25 steps right now.  Even when its done, if I cant narrow down the index of '/rotate 0/' more precicely, it may be too slow.  It has taken 30s to a minute until the "do until" is finished.





I bailed on this.  Its not happening.  Too much effort.

Regular Visitor

Hi @martinav , for some reason i cannot explain, when i am in pdf viewer of my desktop app and hit with barcode scanner a qr code with link , pdf rotates one time clock wise!!! Qr code contains for example Maybe Carriage Return and Line Feed together is the solution!!!


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,365)