Question

How can I control element size in PDF export?

  • 30 January 2017
  • 6 replies
  • 544 views

I’ve been trying out PDF exports for dashboards, and for some reason the resulting elements shrink. The results are the same if exporting from a space or a LookML dashboard, and by email or download.


When I let four tiles sort and size themselves (as when exporting from LookML), they end up center-top aligned on the (landscape) PDF page, in a total area about 1/2 as wide as the page and 2/3 the height.


Does anyone have any thought about why they’re not expanding to fill the page? When I look at the same dashboards via the web interface, they tile and size normally.


6 replies

Userlevel 3

Hey @Shawn


We render our PDF’s with a width of 1280. I would suggest checking your screen size as this could be causing the issues when downloading the PDF, as Jules describes here.


Feel free to visit help.looker.com if you’d like us to take a closer look at your specific case.

My screen is of 1920x1080, but shouldn’t that mean that they look bigger when rendered to PDF? They get smaller. Also the fonts get quite little as well.


EDIT: I just tried manually setting the width of the dashboard within the Dashboard LookML to 1200, the tile size to 100 and the width of the individual elements to 6. The result was the same as the original. Maybe 1200 isn’t actually the width it’s rendering?


EDIT to the EDIT: (I should really try more than one thing before replying) It looks like the page width of the pdf is actually ~1900, but the usable space in the middle is 1200 across. I set the width of the dashboard to 1900 and the width of the elements to 9, and each one is about 1/2 as wide as the page, but the layout forces them to one per line. There’s a gutter on the left about 350px wide, which would be consistent with a 1900px page with a 1200px chunk in the center. Interestingly the title bar at the top actually uses the entire width of the dashboard.


Maybe it’s confusing landscape and portrait or something like that? The page is definitely wide rather than narrow.

Userlevel 2

Hi @Shawn,


I’ll reach out to some engineers on this and see what’s going on.


Cheers,

Vincent

Thanks! I didn’t try exporting PDFs until 4.4 so it could be a recent issue?

Userlevel 2

Hi @Shawn,


Also, if you don’t mind, would you send an email with the info above, along with any other useful info, to help.looker.com so we can track this internally? Thanks!


Cheers,

Vincent

Just a quick update, since upgrading to 4.6, the size is the same but now it’s aligned to the upper left instead of doing the strange centering thing.

Reply