[Simple Reports With PDF] PDF Margins

[Simple Reports With PDF] PDF Margins

Forge Component
Published on 5 Jan by Huarlem Lima
7 votes
Published on 5 Jan by Huarlem Lima

Hi Guys,

I'm having issues with the final product. Once the PDF has been generated and the user downloads the PDF, the margins or page layout seem to fall apart. There is a lot of added white space to the left and bottom of the page which is causing a lack of professionalism. The images below show the issue.

The first image showing how the PDF looks whilst viewing the web screen in a browser and the second showing the downloaded version.



As you can see there is a lot of added space. I'm thinking it is a CSS problem or possibly the 'Grid Type'? Any help would be amazing.



Hello Oliver.

We have being using this component without problem.
Can you give us more information? 

Like the version you are using, the platform version, the template of your application, etc?
Also, could you upload a sample of the PDF so we can take a look on it?



Hi Eduardo,

I republished the original version of the application straight from the Forge and the issue still remains. Which leads me to believe it isn't something that I changed throughout the development of my PDF. 

I've attached two files, one showing how the PDF is saved when saved through the 'Print' button using the browser print / save features (Google Chrome) and the other by using the 'PDF Download' button. 

Another thing to note is I have tried this in my personal environment which works as expected with no errors at all.

The Service Studio version is: 10.0.609.0

The environment version is: 10.0.405.0

And what do you mean by the template of my application?




Hello Oliver,

The template is your applications template, like Web Application or Dublin or Lisbon, ext. Because they have lots of associated CSS/javascript it's always a source of potential conflicts.

In any case, the difference between the two documents are easy to explain. One is just a web page the browser is converting into PDF. The other is a webpage that an executable in the server is converting to PDF.

When using the HTML2PDF component directly, we had this same problem with margins being automatically add to the document.

We had to pass extra options when executing the app to take care of it.

To it work on your personal but not in the enterprise, I would say that your template is different, or the executable version is and this is the source of problem.

I'm out of office now. In the weekend I'll take a look on our application and do some tests myself.




Hi Jauch,

Sorry we've been referring to the template as the theme so I misunderstood you. I have been using a custom theme based off Dublin but this was my initial thought also. I republished the original application from the forge and had the same issue so I can't imagine the theme being the issue.

Your comment about the executable is very interesting and something I'll look at further. I've added a picture of my current executable below. We initially spent a while trying to sort out the executable so its quite possible we are using the wrong one.

Thanks for all your help so far, have a good week.


Hello Oliver,

Sorry for take so long to answer. Only now I had time to do some tests.
In fact, the Simple Reports with PDF is somewhat buggy. 

We also are experiencing some problems with margins in the downloaded file and even the site to test the code is not working properly.

I tested the "Simple Reports" + HTML2PDF (through the PDF Report Demo application from forge) and it seems to be working properly.

So, if you didn't found a way to solve this problem (or is not using something else), I would suggest to use the same approach on the PDF Report Demo.


Hello Eduardo,

Sorry for taking so long to reply too, you must have caught me just as I went on holiday. I have also noticed some bugs whilst using 'Simple Reports with PDF' but overall have found it enjoyable and simple to use.

Now I do have good news. After taking a further look into the executable's as you suggested, I noticed that when me and my co-worker initially set up the executable's we set up two different ones (within my personal environment and the enterprise environment). This is why the margin issues were not in my personal environment. 

We have now matched the executable's which has solved all our issues to do with the page margins. If anyone else is having similar problems, make sure you do check the executable's thoroughly since the names are often identical but can make a big difference.

Thanks a lot Eduardo,



No problem. Good to hear the problem is solved. I'll check the executable on our side also, to see if the error also is solved.

Please, consider marking one of the answers as solution in order to help others to easily spot the solution.

Hope the holidays were good. ;)


Eduardo Jauch