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

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Unanswered

Power Apps PDF orientations

(0) ShareShare
ReportReport
Posted on by 2
I'm trying to create a dynamic certificate template which will take user inputs for awards and on that basis corresponding images will be shown on the Certificate template. I'm using a PDF function to convert the container to PDF and then send it as an email to the recipient. When I try to print this PDF I get neat and clear pdf template, but when I try to send it as an attachment, the images are half loaded in it. Also, I tried adding few delays to it but doesn't seem to work. Any help would be appreciated!
 
Thanks!
 
Set(
    pdfBlob1,
    PDF(Container3,{Orientation: PaperOrientation.Portrait})
);
 
Set(
    pdfFile1,
    {
        Name: varToName & "_Certificate.pdf",
        ContentBytes: pdfBlob
    }
);
 
Office365Outlook.SendEmailV2(
    User().Email,
    "Way to GO!!!",
    "Test",
    {
        Attachments: Table({Name: "ABCD.PDF",ContentBytes: pdfBlob1})
    }
);
 
Print();
 
Notify("Email Sent", NotificationType.Success, 30000);
Set(pdfBlob1, Blank());
Set(pdfFile1, Blank());
 
I have the same question (0)
  • WarrenBelz Profile Picture
    150,367 Most Valuable Professional on at
    Power Apps PDF orientations
    I probably asked the wrong question. How are you saving and viewing the PDF file that you say is correct format. If you are simply referring to what you see on the screen, then I will go back to my first statement- the experimental PDF Function does not handle images well or consistently as this has been the case since it was introduced. There are no parameters in the Function that I am aware of that have any effect on the output in this area.
    There are however a couple of things that may be worth looking at. Firstly, is the image URL-based ? If so this is the area of most problems as often it is not rendered at all. 
    Also (if not URL), can you see the image on the screen before the PDF function is initiated (in other words is it loaded and rendered properly before the PDF print is initiated). This is also a possible cause of mis-aligned images (it is not loaded properly).
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn
  • CU18092119-0 Profile Picture
    2 on at
    Power Apps PDF orientations
    I'm using the above-mentioned code to print it.
  • WarrenBelz Profile Picture
    150,367 Most Valuable Professional on at
    Power Apps PDF orientations
    The experimental PDF function does not handle images well, however your comment that when you print it, the outcome is as expected but does not do the same to an email attachment is interesting. What mechanism and output are you using to print it ?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 954 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 386 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 364

Last 30 days Overall leaderboard

Featured topics