Document Layout Widget / Document Generation : How to ensure full-page white background on last page?

0
Hi all, I'm working on a PDF template using the new Document Generation module along with the Document Layout Widget. The goal is to generate lists that span multiple pages with repeating headers and footers, which is working well overall. However, I'm running into an issue where the white background only extends to the content height on the final page. This results in a gray area below the content on that last page — presumably where the page background isn't being explicitly styled. I've already tried: Wrapping the Document Layout Widget in a container with a white background. Adding a container with a white background inside the bodyContent slot. Setting a fixed height (e.g., matching A4 page size at 150 DPI) on these containers. Unfortunately, none of these approaches resolve the issue — the gray area still appears when the last page has limited content. Is there a way to set the default background color of each PDF page to white — regardless of content height? Has anyone encountered this and found a reliable workaround? Thanks in advance!
asked
1 answers
0

Probably some web style leaking into your PDF page design.

 

Put a button somewhere to open the PDF page directly, then you can inspect the grey area to see where the grey background comes from. I always have some admin page or admin button to open the PDF generation pages directly, to inspect styling and check data without waiting for the PDF to be generated and opening it.

 

Check out my blog to find more details on the classes you need to use in your styling.

 

https://medium.com/mendix/pdf-document-generation-in-mendix-a95e67d41503

 

 

answered