Document generation works perfectly fine locally but creates an empty white pdf in cloud environment

0
We have a feature that generates Pdfs with the official mendix plugin. It can generate 4 different kinds of pdfs, each of them has their unique page that is used in the Document generation microflow to generate the pdf.   But something strange is happening: Locally, everything works perfectly fine. In the acceptance environment, only 3 out of 4 of the documents are being generated. One of them shows no errors or exceptions but generates and empty white page. What could be happening for this to occur?
asked
1 answers
2

Hi Maximo,

 

Not sure if it's a data related issue or something with styling. We've had some issues with the document generation module, specifically with differences between local generation and cloud generation. One of the first things I would advise you to do is the following:

 

Your cloud environment will use chromium to generate the PDF. You can configure your local environment to use the same chromium configuration by correctly setting up your constant. The configuration document has a section about using chromium: 

 

-------

If you use Chromium, only use stable releases. The currently supported stable release is 112.0.5615.0.

Download the chrome-win.zip package and extract the archive to a location of your choosing.

Configure the path to the chrome.exe executable in the CustomChromePath constant in the _UseMe > Configuration folder.

----

 

By doing this you can at least replicate the document generation in the same way your Cloud environment does. In order to help with debugging, I also advise to create a seperate flow that actually opens the pages that you are going to generate, that way it's easier to debug and see the results in your browser before generating the PDF.

answered