cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinav
Community Champion
Community Champion

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?

1 ACCEPTED SOLUTION

Accepted Solutions
martinav
Community Champion
Community Champion

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

View solution in original post

3 REPLIES 3
v-xida-msft
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.

 

*PRELIMINARY* View:

 

image.png

martinav
Community Champion
Community Champion

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

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,162)