[Html2PdfConverter] Rendering of Charts in pdf

[Html2PdfConverter] Rendering of Charts in pdf

  
Forge Component
(49)
Published on 21 Mar by Guilherme Pereira
49 votes
Published on 21 Mar by Guilherme Pereira

Hello all

I am not able to render charts into my pdf

I tried limiting the size of the container and also setting the theme grid style to fixed but that is not working 

Can anyone help me out?

Hi prajjwal,

Can you please attach your oml, So that it will will be easy to help you.

Cheers,

Rocky

Solution

Hello Prajjwal

You need to put your page in a Flow that uses a Theme with the grid set to FIXED, but also you need to define both dimensions (width for sure, if I remember well) of the container where the graph is, using pixels, as % (and cols will be translated as %) will cause problems.

If the graph still does not appear, the problem can ne something else and than, in order to help, being able to peek the module will possible help.

Remember that the PDF generator will call the page from OUTSIDE the session of the user, so you CAN'T use anything session related to the user, as the values will be the default ones, not the values from the user.

Hope this helps.

Cheers

Solution

Eduardo Jauch wrote:

Hello Prajjwal

You need to put your page in a Flow that uses a Theme with the grid set to FIXED, but also you need to define both dimensions (width for sure, if I remember well) of the container where the graph is, using pixels, as % (and cols will be translated as %) will cause problems.

If the graph still does not appear, the problem can ne something else and than, in order to help, being able to peek the module will possible help.

Remember that the PDF generator will call the page from OUTSIDE the session of the user, so you CAN'T use anything session related to the user, as the values will be the default ones, not the values from the user.

Hope this helps.

Cheers

Hi Eduardo

Many thanks to you for suggesting the pixel thing, it did the trick

I may add that we don't need to fix the grid type of our application, just the width and height of the container enclosing the graph

It worked for me

Thanks again for the solution

This was bothering me for quite a long time


Rocky wrote:

Hi prajjwal,

Can you please attach your oml, So that it will will be easy to help you.

Cheers,

Rocky

I apologise Rocky, but the app contains enterprise sensitive information so I caould't share it

Thnaks for the reply