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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Anybody able to create...
Power Automate
Unanswered

Anybody able to create a pdf that has tick symbol with Convert File Connector?

(0) ShareShare
ReportReport
Posted on by 94

Hi,

 

I am in the process of creating an pdf file with the various Power Automate connectors.   As shown,
I have no issues with the workflow but somehow a tick symbol does not show in the pdf file created.
It just shows a square box instead. 

 

However, I can see the tick symbol in the html file created at "Create file - html".  I have tested this
html file with online html to pdf conversion website,  it is able to convert it to pdf showing the tick

symbol.

 

Anybody got any ideas or workaround?

 

Thanks in advance!

 

 

 

 

 

Screenshot 2022-10-01 at 5.58.18 PM.png

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @0orion0 ,

     

    Unfortunately, The convert action (onedrive for bussiness connector) has a lot of limitations.

    I recommend that you use some third-party connectors to convert html to pdf such as encodian...

     

    Best Regards,

    Wearsky

  • Verified answer
    msabau Profile Picture
    270 on at

    I had the same issue when trying to convert true and false to ticks and crosses, so I just wrote a script at the end of the html file.

     

    <script>
    document.querySelectorAll('[data-content-type="yn"]').forEach(element=> element.innerHTML=="False" ? element.innerHTML = "&#x2717;" : element.innerHTML = "&#x2713;")
    </script>
     
    I put in every tag in the HTML that contains true or false a data attribute
     
    data-content-type="yn"
     
    There's another slightly easier way to get the same result without updating each tag with the data attribute, but that could result in some conflicts.
    Let me know if you need any help with this
  • 0orion0 Profile Picture
    94 on at

    Thanks @v-xiaochen-msf. I have used Encodian before, trying to save some cost 

    for the company by using the default File Convertor.

     

    Thanks @msabau, your answer seems very promising to solve
    the issue. It is right now a bit over my head, could your indicate

    some links where I could study and slowly build it up from there.

    Thanks!

     

     
  • msabau Profile Picture
    270 on at

    My html for yes/no fields looks like this:

     

    <table>
    <tbody>
    <tr>
    <th>Name of the row</th>
    <th data-content-type="yn">
    @{outputs('Get_element')?['body/[Name of the yes/no field you get with dynamic content]']}
    </th>

    </tbody>

    </table>

     

    I updated the script as it seems that it didn''t work properly the first time around:

     

    on the <body> tag you should have this:

    <body onload="yn()">

     

    and this is the updated script tag:

    <script type="text/javascript">
    function yn() {
    document
    .querySelectorAll('[data-content-type="yn"]')
    .forEach((element) => {
    if (element.innerHTML.trim() === "False") {
    element.innerHTML = " ";
    } else if (element.innerHTML.trim() === "True") {
    element.innerHTML = "&#x2713;";
    }
    });
    </script>

     

    I put the script tag before the body tag, you could try to leave it at the end, but now I'm not sure if it would work properly.

    As for resources about JavaScript, you should check out w3schools.com

     

    I'll try to give you a brief explanation on how the script works.

     

    After the body part of the page has loaded, the yn() function will start. That's why we have this: <body onload="yn()">

    The script tag has the type="text/javascript" attribute just to make sure that the browser knows that this is a JS script.

    Inside, we define the yn() function, which is the thing that will replace all the True and False values inside the tags that have the data-content-type="tn" attribute.

    The first thing it does is that it queries all things that have that attribute and return an array.

    Then, for each element of the array, it trims all the whitespace that may occur and if the value is "False" it leaves a blank space (or whatever you tell it to do, it might also be a cross or anything else) or else, if the value is "True" it replaces it with a checkmark.

    That's about it.

    Feel free to contact me if you have any questions

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard