web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Method to rotate a PDF...
Power Apps
Answered

Method to rotate a PDF CLOSE to completion!

(0) ShareShare
ReportReport
Posted on by 3,340

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

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    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,

  • martinav Profile Picture
    3,340 on at

    @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.

     

    *PRELIMINARY* View:

     

    image.png

  • Verified answer
    martinav Profile Picture
    3,340 on at

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

  • Sgeo Profile Picture
    2 on at

    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 https://www.xxxxxxx.com. Maybe Carriage Return and Line Feed together is the solution!!!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 340

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard