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

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

  
Forge Component
(21)
Published on 16 Jan by Rafael Fantato
21 votes
Published on 16 Jan 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 

--no-background

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.

Hi!

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.


Thanks!

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 ...