Skip to main content

Notifications

Community site session details

Community site session details

Session Id : WTks39nXAs7uxGeUCvaG2u
Power Automate - General Discussion
Unanswered

Convert file using path - OneDrive for Business - Convert to PDF - Landscape

Like (1) ShareShare
ReportReport
Posted on 6 Jan 2020 11:55:06 by 2

I have a flow that works fine converting an HTML document to PDF.  

However I need it to be a Landscape PDF so I don't get word wrapping as this messes up the format.

I have added the HTML attribute "body width=276mm" to the HTML and this has stopped the wrapping, but the end of the lines are now just missing from the portrait PDF document.

Can I force the PDF to be landscape?

I don't want to use an external tool.

Thanks

 

  • G0Springs Profile Picture
    134 on 25 Jan 2022 at 13:51:15
    Re: Convert file using path - OneDrive for Business - Convert to PDF - Landscape

    @Pete_Thompson and @yashag2255 

     

    May I ask how you added the HTML attribute "body width=276mm" to the HTML to stop the wrapping.

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on 07 Jan 2020 at 07:46:16
    Re: Convert file using path - OneDrive for Business - Convert to PDF - Landscape

    Hey @Pete_Thompson 

     

    There is no way to force the orientation of the page. This feature is currently in preview feature that is why you cannot do much customization as part of this.

    I have worked on a similar scenario and keeping the width throughout the html document under 500px worked fine for me. Since you have passed the width as 256mm it is working. I would suggest you add this width parameter to the child tags as well. I know this will require some extra effort but in the end, it will convert the expected pdf.

    If you think this should be added as a capability, please raise an idea or upvote if exist already on: 

    https://powerusers.microsoft.com/t5/Power-Automate-Ideas/idb-p/MPAIdeas 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

Overall leaderboard