Google Data Studio PDF Export

The story of developing a handy Chrome plugin. Two times.

Áron Igmándy
Apr 10, 2017 · 5 min read
Image for post
Image for post

This is the brief story of some curious minds at Mito who tried to enhance a Google product by creating PDF Export Chrome Extension for Data Studio. As every good story, this one also involves some unexpected twists and complications, but also a happy end:

Finally we created a Chrome extension that you can add to your browser here: Google Data Studio PDF Export.

If you’re interested in the details of the story keep on reading, it gets good!

Early 2017 Google released Data Studio to the broader audience and feedbacks were generally great. Data visualization and analytics professionals loved the idea of visualizing data from multiple sources on an easy to use interface, with collaborative editing and multiple inherited advantages from other Google services.

But as more and more people started using it, more and more questions popped up about the lack of export abilities:

  • “I know it is meant to be a cloud-based interactive dashboarding engine, but if we wanted to export the data from a report into a hardcopy PDF? There is no functionality to do that currently. Is this something that the team is considering creating?” Joshua W
  • ”I’d like to export my Data Studio report as a PDF. How do I do this?”Melissa T
  • “Is there the ability to export to PDF?”Rich F

And the answers weren’t so cheerful. Practically there was no way to export our report pages to PDF natively. Even the official FAQ advised to use system print to export pages:

“PDF export is not yet built into Data Studio, but it’s on the roadmap. You can print single report page via the system print dialog if your OS/browser supports that.”

Ok, that’s doable, but a bit uncomfortable. Especially when you have a report with 20 pages. Printing them to PDFs one by one, then stitching them together into a single PDF document is not fun.

But other than that you only had Google’s share option. We know that a dashboard is a live thing, so when it’s exported into a static PDF, it loses its accuracy immediately. And having no PDF export is also likely a business decision of Google to facilitate the quicker spread of the service in the professional environment.

But still. It’s a real pain in the ass if your clients request any type of export that’s needed for their Big Weekly Sales Meeting or any other management report. That’s why we decided to turn this problem into a mini Mito Studio project and develop an uninvited feature add-on, the eloquently named Google Data Studio PDF Export.

The development

There was no detailed brief or thoroughly planned specification for the project, just the aim to be capable of exporting all the pages of a document with one click; everything else is an extra. One developer, two days, make it or leave it. We won’t dive into the technical details here, but of course the development didn’t go as smoothly as planned. We hit a couple of dead ends with PDF libs and canvas solutions, meanwhile found the way of using (hacking) the built-in system print function and to detect page load actions pretty accurately. In the end, it was 211 lines of javascript scraping, printing and other forms of voodoo mixed with black magic.

The release was pretty straightforward, even if the Chrome Webstore has the most retro and UX-free UI (90’s we loved you!) of all known Google services. We successfully released our plugin 2 weeks after we decided to make it.

The feedbacks were quite good.

“Exactly what I was needing. Thank you for creating this!” Brandy Lawson

A week of contentment, a good amount of fist bumps from various people all around the world, the first version of this post aaand…

…we were screwed: a Google redesign.

As suspected: suddenly our freshly baked plugin did not work anymore. :(

Honestly, we were quite sad about it. And of course we couldn’t let the plugin die so quickly, so early.

So let’s go for a second round: one developer, two days, make it or…

We managed not just rebuilding the extension on the ashes of the old one and fit it to the new Data Studio UI, but fix a couple of legacy bugs as well. Of course, the process added a few more pages to the project’s already long enough “lessons learned” list. For example:

  • Did you know that if you use chrome.tabs API it will ask the users for permissions to access their browsing activity, even if you don’t do any related request in your extension?
  • Or could you guess how many types of user data can be cleared from your browser by an extension without asking for a permission?

We didn’t, but all these sidequests made the path valuable and gave us a chance to get to know more about the environment what we use day-by-day.


That’s all, here we are, with a fresh extension, waiting for Google to crash it or make it obsolete by adding the PDF export functionality to the Data Studio. One thing’s true for sure:

If you’re building on a service which doesn’t want you to build on it, no matter how great your product, it will end ugly.

So was it worth investing all that work into something that might be forgotten in a couple of weeks?

By now we know a lot more about scraper algorithms, behavior mapping, Chrome Extensions’ privacy, built-in mechanism of chromium browsers, etc. than we did a month ago. Not to mention the refreshing effect of new pet projects that can give you some extra boost to start your everyday tasks.

So sure, it was worth it. Even if all the benefits we’ve gained are the knowledge and experience that we’ve picked up while we tried to make the plugin work. It was fun, so we encourage you too to experiment with such things: try solving everyday problems, experiment with new things, and fail if it’s necessary — all these things will move you forward in different ways.

Mito Studio is the place within Mito where we dream up and experiment with our own ideas besides our daily work. Check out some more clever things.

Mito Studio

The sandbox playground of Mito

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store