One of the guiding design principles we use with Vexlio is that performing common tasks should be as painless as possible. While exporting is something that you’ll probably spend less time on than actually creating your diagrams, it’s still an important part of your workflow. In this post we’ll look at the different options available when exporting your diagrams, including automatic cropping, extra whitespace padding, and more.


Exporting your drawings

Quick and easy exporting is something we really like about Vexlio. There are a few ways to choose how your drawing will be exported, so let’s start by looking at the export window itself:

Vexlio's export window.

Vexlio's export window.

There is a small preview image in the box on the left side of the window, which updates automatically to show how your exported image will look. In the top right we see three tabs, one for each of the three main export modes. Below that is an area to select your desired output image size and format, and choose a few other common options.

By default, Vexlio will automatically crop the exported image tightly to the objects that are in your drawing. You can also export the current view of your drawing, or select a specific region to export. We’ll look at the options common to all three modes first.

Common options

In any export mode, you can choose how big in pixels you want the exported image to be. Because Vexlio diagrams are vector-based, you can make the output image as large or as small as you want — it won’t be blurry at any scale.

Vexlio will choose an initial output size for you, and in many cases it will be fine to just leave it there. If you’d like to change the size, simply adjust either the width or height values, and the other will update automatically to ensure your exported image is not squashed or distorted. When exporting to a PDF, while you can still specify an output size in pixels, this will just change the “page size” of the resulting PDF. In many common scenarios, you can just ignore this setting when exporting to a PDF.

There is also a checkbox labeled “Selected objects only.” When this box is checked, all objects that aren’t currently selected in your drawing will be hidden from the exported image. This is a very convenient option to switch on and off, and the preview image will automatically update to show you how your image will look.

Export modes

In addition to changing the common options, there are also three different export modes, corresponding to the three tabs on the right side of the window.

Drawing

This is the default export mode which automatically crops the exported image to the entire drawing. By default, the image is tightly cropped to the drawing content, but if you want extra padding around the edges of the drawing, you can use the “Add outside padding” checkbox. This will add a custom amount of empty space around the outside of the drawing. This works in both PNG and PDF exports.

Current view

Sometimes you might want to zoom in on a piece of your diagram and export the image at that zoomed-in level. For that, you can use the second export mode “Current view.” This just takes the drawing exactly how it appears in the main Vexlio window and exports it directly. That means you can control the zoom level as well as the cropping of your drawing.

Select region

Finally, it can be convenient to interactively select a region of your drawing to export, giving you a bit better control of the appearance of the exported image. The third mode, “Select region,” displays a moveable and resizable rectangle on top of your drawing that you can directly adjust to your liking.

Click to play a clip showing the "select region" export mode.

Batch exporting

Sometimes you might want to take a single drawing and export it to many images of different sizes. You can do this “batch mode” exporting in Vexlio by using the command line interface, which we’ll save for a future blog post.

Thanks for reading, and remember you can follow us on Twitter to stay up to date with Vexlio news. Also be sure to let us know if you have a subject that you’d like us to tackle here!


Want to try out Vexlio for yourself?

Instantly create precise, beautiful diagrams.