parvez / snapshot

Report Generation for ElasticSearch Kibana / Grafana
54 stars 18 forks source link

Generate pdf without page breaks #13

Open adrianlzt opened 7 years ago

adrianlzt commented 7 years ago

With the current implementation PDF could break graphs betweek two pages. I'm looking how to generate a pdf without page breaks.

I have set to empty the paper size property page.paperSize = {};, but the render make weird things: captura de pantalla de 2017-01-13 13-47-00

adrianlzt commented 7 years ago

Adding this lines

  page.viewportSize = { width: 1500, height: pdfViewportHeight } 
  page.paperSize = {};

And removing the page.evaluate(function() {

Generate a decent one page pdf for the selected dashboard.

The left yaxis label is not rotated, don't know why.

I will try to make an option for the page format that generates one page pdf.

parvez commented 7 years ago

Can you make a PR?