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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PDF - Expand Container...
Power Apps
Unanswered

PDF - Expand Containers not working for Gallery and Container

(0) ShareShare
ReportReport
Posted on by 27
Dear All, 
 
It would be much appreciated if you would help me on this. 
I have screen consist of one main container (ResultMainContainer_Test), one left sub-container(LeftContainer_Test) and one right sub-container (RightContainer_Test), and a Gallery was included in the RightContainer.
The Gallery contains list of information which cannot show in one page. I want to export the main container to one pdf file, including all the information listed in the Gallery.
 
When the "Proceed Next" button was selected, it will generate a pdf file and send for approval by Power Automate (ApprovalEmail). Please find the code below:
Set(
    PDFContent,
    {
        ContentBytes: PDF(
            ResultMainContainer_Test,
            {
                Orientation: PaperOrientation.Portrait,
                Size: PaperSize.A4,
                DPI: 150,
                ExpandContainers: true
            }
        ),
        Name: "Executive Summary.pdf",
file: {
    contentBytes: PDF(ResultMainContainer_Test),ExpandContainers: true,Orientation: PaperOrientation.Portrait,
                Size: PaperSize.A4,
                DPI: 150,
    name: "Executive Summary.pdf" 
}
 
    }
);
 
ApprovalEmail.Run("Executive Summary.pdf","Please review and approve.", "Approver email","[Approval request],User().Email,User().FullName,PDFContent);
 
 
Although ExpandContainers: true, it is not working and only showing the screen as shown below. Is there anything wrong with the code? thanks a lot for your help. 
Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard