We are working PowerApps, and one of the requirements is to print to pdf. We have a print screen, and In that, we have multiple galleries, Images, and other control (s) that can go more than five pages. The expectation is to print each gallery on a separate screen. For A4 size (pdf) height of the screen should be 1123. I know we can adjust the screen's height dynamically and print it, but it shows as only one page.
Find the attachment for reference.
I see the idea (https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Improve-Print-Implement-printing-of-multiple-pages/idi-p/887134) created last year, but still status is New.
Questions:
1. Can we able to create multiple pdf pages?
2. If Yes, How to achieve it? If not, is there any workaround?
Thanks,
Stalin
The Print() function does not support multi page pdf creation currenlty.
But there is one workaround through which you can achieve your requirement.
1. Create a Vertical Container and append the Galleries inside the container. If you have already developed each gallery in different pages, try pulling the data from those galleries to fill the fields in the duplicate galleries you are creating inside the container.
2. Use the experimental function PDF() instead of the Print() Function
This will return a PDF file which you can store in a variable.
The most important part is to set {ExpandContainers: true} which will expand all the items in the container while creating the PDF which will automatically result in a multi page PDF
Set(
varPDF,
PDF(
Container,
{ExpandContainers: true}
)
);
3. Create a new screen with a PDFViewer and pass the PDF File to view the PDF.
Additionally you can use Power Automate flows to download and store the PDF in sharepoint
The below link was pretty useful for me to accomplish these steps
https://www.matthewdevaney.com/power-apps-pdf-function-create-view-download-pdfs/
Hello,
Is there any workaround now or work in progress on this feature?
I can't see the idea linked above
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional