Skip to main content

Notifications

Power Automate - Building Flows
Answered

How to convert Create HTML table step to PDF file using Acrobat API

(0) ShareShare
ReportReport
Posted on by 15
Dear Community Members,
I have created a flow which takes data from Excel, creates a HTML table and send individual emails. Now I also want to send a PDF file for the table created as an attachment. I have Acrobat API and am trying to use.
If anyone know how I can do this, that would be really great.
 
Regards 
Subodh Gupta
  • SG-14121036-0 Profile Picture
    SG-14121036-0 15 on at
    How to convert Create HTML table step to PDF file using Acrobat API
    Many thanks Mark.. It worked
  • Verified answer
    Mark Nanneman Profile Picture
    Mark Nanneman 831 on at
    How to convert Create HTML table step to PDF file using Acrobat API
    Yes you can convert an HTML with an image into a PDF with the image using the OneDrive actions.  You just need to inline encode the image content.
     
    Use this template for your src property of your img element:
    src="data:<content-type>;base64,<base64-encoded-image-content>"
     
    E.g.
    <div>
    <img src="data:@{body('Get_file_content_1')?['$content-type']};base64,@{base64(body('Get_file_content_1'))}" alt="Embedded Image" />
    </div>
    You can do a "Get file content" from a One Drive or SharePoint file, and reference the "$content-type" to get the content type (e.g. "image/png") and just use base64() on the output of the file content action for the data.
     
    $content-type:
    base64 expression:
     
    Example:


    Hope this helps!

    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  | Buy me a coffee
  • SG-14121036-0 Profile Picture
    SG-14121036-0 15 on at
    How to convert Create HTML table step to PDF file using Acrobat API
    Thanks Mark,
    It works, but I have small request. In the create file, I cannot put Organisation Logo. Is there a way to put Log in this and make it more customize.
    Regards
     
    Subodh
  • Verified answer
    Mark Nanneman Profile Picture
    Mark Nanneman 831 on at
    How to convert Create HTML table step to PDF file using Acrobat API
    I know you can do this with Adobe PDF Services--I believe you might be able to use your credentials from Acrobat API, but I can't remember for sure.
     
    That said, you might want to consider trying the standard OneDrive action "Convert file" to target type PDF.  It works OK on simple HTML documents.
     
    OneDrive for Business:
     
    Here's the Adobe PDF Services actions you can use.
     

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard