Hi everyone,
I am generating a PDF from a Container in Power Apps using the PDF() function with the following settings:
Size: PaperSize.A5
Margin: "0pt"
ExpandContainers: true
Here is the code I am using:
varResult,
CreateCardPDF.Run(
User().Email,
{
file: {
contentBytes: PDF(
Container1,
{
Size: PaperSize.A5,
ExpandContainers: true,
Margin: "0pt"
}
),
name: "Card.pdf"
}
}
)
);
The issue:
Even though I have set the margin to 0pt and adjusted my container and image to fill the entire area (Width = Parent.Width, Height = Parent.Height, ImagePosition = Fill), I still get a white space at the bottom of the generated A5 PDF.
It does not look like a margin issue — it seems like the container height does not fully match the A5 page height when rendered as PDF.
What I have already tried:
Setting all container padding to 0
Using ImagePosition.Fill
Manually setting container size to match A5 ratio
Extending the background image height slightly
However, the white space at the bottom still appears.
Has anyone experienced this behavior with the PDF() function when using A5 size?
Is there a known rendering limitation or a recommended way to force the container to exactly match the PDF page height?


Report
All responses (
Answers (