Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Rich text field to HTML to PDF = large margins

(0) ShareShare
ReportReport
Posted on by 75

I have a rich text field that I include into a HTML output on onedrive which I then convert to PDF. But in the PDF I have huge gaps between the rich text field content and the content before (the HTML file itself is rendered correctly when I save that directly) Has anyone an idea how to overcome this?

 

And does anyone know if these autogenerated div classes always have the same length? I.e. If I could cut them away?

PDF.PNG

HTML.PNG

Source.PNG

 

I've tried an

ul,ol {
margin-top:0px;
display:inline
}
 

  • Maexchen Profile Picture
    75 on at
    Re: Rich text field to HTML to PDF = large margins

    sorry, EMEA flow was down this morning so it took me a while to test. that seems to have worked in combination with applying the same margins to the preceeding <p>.

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: Rich text field to HTML to PDF = large margins

    Hi @Maexchen,

     

    Could you please have a try:

    ul,ol {
    margin-top:0px;

    margin-bottom:0px;
    display:inline
    }
     

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

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow