Sketch2PDF—Sketch Plugin For One-click Export, Merge & Optimization of PDFs

Joro Yordanov
Mar 26, 2018 · 3 min read
Image for post
Image for post
Image for post
Image for post

The Problem

Recently we had this large design project at Oblik Studio—we had to design an identity and branding as well as a website and a set of various digital materials. One of them was a pitch deck for the product, which we decided to design using Sketch, since our Design System was already set there.

The workflow was:

  1. Design each slide on a separate artboard in Sketch

Working on a PDF presentation that is constantly being improved and published, means that you have to go through all of these 4 steps a few times per day which is not only annoying but it is also very time-consuming.

Therefore, the whole process should be streamlined in a much simpler workflow.

I strongly believe that if a repetitive process can be automated, then it definitely should. In this way, you can focus on solving real (design) problems instead of fighting with a software.

The Solution

Image for post
Image for post
A demo showing how it works with a few slides for

Firstly, I started by using Terminal to merge all separate PDF files into a single one by running a Python script that comes with the macOS Automator.

Then I found a way to optimize the file size with ps2pdf, which is a part of Ghostcript, by running a Terminal command.

Still — I had to run two commands after the PDF export is completed.

I realized that there must have been a way to auto run these commands on something like a hook. Consequently, that hook must have been triggered when one uses the built in export functionality of Sketch; and I found SVGO Export.

By reusing a part of its codebase, I was able to create a simple, no-GUI plugin that automates the whole process of exporting, merging and optimizing PDFs.

Image for post
Image for post

Oblik Studio is a cross-disciplinary design studio. If you are looking for a design partner, get in touch.

Oblik Studio

a cross-disciplinary design studio and the people behind it

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