Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

White Spaces HTML to PDF not working

(0) ShareShare
ReportReport
Posted on by 125

Hello Folks,

 

I have a flow, the HTML will convert into PDF. So I have a set of html elements and white spaces seems not working I have already tried the  

 

 

  • RavKobus Profile Picture
    RavKobus 14 on at
  • philifova Profile Picture
    philifova 125 on at
    Re: White Spaces HTML to PDF not working

    Thanks @Sundeep_Malik  @g1224  for the help! Appreciate it big time!

  • philifova Profile Picture
    philifova 125 on at
    Re: White Spaces HTML to PDF not working

    @Sundeep_Malik 

     

    I'm creating the HTML elements in my PowerApps. (htmlText)

     

    My flow is basically transferring the HtmlText in html file in my one drive. Once done it will start converting to PDF.

     

    The output should be  S T R I C L Y   C O N F I D E N T I A L (have a multiple space in middle of two words.)

     

  • Verified answer
    g1224 Profile Picture
    g1224 348 on at
    Re: White Spaces HTML to PDF not working

    Hi again ! @philifova , 

     

    Can you try putting the styles inside the pre tag ? 

    Like : <pre style="font-family:calibri;font-size:14pt;"....

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at
    Re: White Spaces HTML to PDF not working

    Hey @philifova 

     

    Can you give an example how you want the white spaces. In my case I did this to get whitespaces:

     

    This is my data:

    Sundeep_Malik_0-1669708834500.png

     

    Then used create html table action:

    Sundeep_Malik_1-1669708869190.png

     

    In the last one I did was:

    item().A

    ' '

    item().B

     

    This is how I gave a space between them. 

     

    Output I got when I added the space:

    Sundeep_Malik_2-1669708991267.png

     

    Output without any space: 

     

    Sundeep_Malik_3-1669709075494.png

     

    So, you can use the above method to add space. I hope it helps. 🙂

  • philifova Profile Picture
    philifova 125 on at
    Re: White Spaces HTML to PDF not working

    @g1224 

     

    Hello!

     

    I also need to retain the font design. Apparently the font and size changed. 

     

    with <pre> tag

    philifova_0-1669708833948.png

     

    w/o <pre> tag

    philifova_1-1669708887397.png

     

    here's the html code: <i><pre><h3 style='text-align: right; margin-top: -20px'> S T R I C L Y C O N F I D E N T I A L </h3></pre></i>

     

     

  • g1224 Profile Picture
    g1224 348 on at
    Re: White Spaces HTML to PDF not working

    Can you try <pre> tag . Basically this preserves whitespaces in a text . 

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard