[Simple Reports PDF] My report contains a grey area after pdf-export

Forge Component
Published on 1 Oct (3 weeks ago) by Rafael Fantato
27 votes
Published on 1 Oct (3 weeks ago) by Rafael Fantato

Hi guys,

First of all, great component, thanks for that.

What I am trying to do is create a pdf export of an a4 portrait report that I easily created with 'simple reports' and save the pdf in the database as a binary. For the conversion I use the component HtmlToPdfConverter. Now when I use both components together, then after the export I get the grey area and the report is shrunk. If I use both components separately, they both work perfectly fine. 

Anyone else experiencing this? Or is there maybe a better way to handle my problem?

I think you should use some values in the HtmlToPdfConverter otherargs parameter like removing the margins 

SyntaxEditor Code Snippet

"-T 0 -B 0 -L 0 -R 0"

i had similar problems.

Thanks for pointing me in that direction, I used 


to remove the grey stuff and it is acceptable now, but I cant influence any margins. I tried your snippet, and also other values but nothing really happens. 

it seams like there is some page size issues... But i'm not realy sure of it.


Just a quick note that might help you.

With the tool HtmlToPdfConverter I have experienced some problems, for instance, with the kerning of fonts (adjusting the spacing between characters), and also displaying Header and Footer. It turned out to be a bug in the tool itself.

You should check the version of HtmlToPdfConverter you are using, and then check on the HtmlToPdfConverter development website if that version has some known bugs that affect the functionality that you are using, in this case, influence the margins.

This might save you some time and headaches.

Thanks guys for helping me out. If my current export is not sufficient for the users then I will take a look over there for sure.


Try this:

SyntaxEditor Code Snippet

-T 0 -R 0 -B 0 -L 0 -s A4 --print-media-type --disable-smart-shrinking --no-background

I have a similar issue using the SimpleReports with PDF module - BUT - my issue is that when I click the PRINT icon, the output matches all of the styles that I want.

HOWEVER, if I click the DOWNLOAD button, the PDF that is downloaded is missing some (not all) of the styles like the color of boxes, font type, etc.

See the screenshot of the buttons ...

This is a limitation of the other component HTML2PDF that uses the wkhtml2pdf tool.

This component doesn't support adv css and css variables so when you export the PDF all basic styles from OutSystems UI is lost, borders, fonts, color, because they use CSS var :(

Hi Everyone

I had such an issue, to overcome it I used a white color on the body tag of the page and it worked for me.