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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Flow: Create a PDF fro...
Power Apps
Answered

Flow: Create a PDF from HTML and landscape that particular data.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hey guys,

 

I am having an issue with trying to landscape the data in my PDF. I created a flow that takes data from my list, converts the data into an HTML table of this data, and then converts the HTML into a PDF. The data that I display in the PDF tends to out stretch the PDF and cuts off the header and the table itself, so I wanted to see if it is possible to make the PDF display as landscape instead of horizontal when it is created. I thought maybe I could update my "Compose"  section of the flow with this 

 

 

replace(body('Create_HTML_table'),'<table>','<table width="100%" border="0" cellspacing="0" cellpadding="0" border="1">')

 

 

I was hoping that the table would resize itself so that it could fit all of the data on the PDF, but I think landscaping the PDF, might be more beneficial. I am open to any and all suggestions.

 

2019-11-26_23-25-52.jpg

 

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Unless something has changed in the last month I'm pretty sure it can't be done, unfortunately

    https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/HTML-Text-to-Flow-PDF-Landscape/td-p/258996

     

    Encodian offers a paid solution

    https://powerusers.microsoft.com/t5/General-Power-Automate/Html-to-landscape-oriented-PDF-alt-solution/m-p/388335#M32896

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you!! Turns out that Encodian has a free subscription. If you use it less than 50 times a month than it is free. The landscape feature worked perfectly. Thanks Again!!

    2019-11-27_10-48-07.jpg

     

  • JonBenito Profile Picture
    26 on at

    I was able to find a way for this to work with the recent updates.

  • moonlight1 Profile Picture
    4 on at

    Hi @JonBenito can you describe your solution? Is it without encodian? thx

  • EdViegas Profile Picture
    436 on at

    If you have a little knowledge of PHP, I recommend you to use DOMPDF library.

    https://github.com/dompdf/dompdf

    https://www.minestron.it/blog/transformando-la-generacion-de-reportes-en-pdf-de-power-automate-la-eficiencia-de-html-y-dompdf

     

  • JonBenito Profile Picture
    26 on at

    No, Encodian or any third party is not allowed within our office premises. I'm pretty much focused in OneDrive convert html to pdf only and standard license for that matter. This code is autogenerated when you try to save any word document as html and This code I need to put on top of the template of my html document

     

    the top of the word doc converted to html looks like this:

     

    JonBenito_1-1719229358440.png

     

    And somewhere along that line of code you will see this.

     

    JonBenito_2-1719229403561.png

     

    Once you are done with the adjustments of size and margins., put this (marked as TemplateHeader) first on the top of your html code, along with your css codes just like this:

     

    JonBenito_3-1719229544234.png

     

    I did not bother to understand the entire line on the converted html from word. Just did a lot of test to get it done 

     

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard