Mail-merged party invitations with gLabels
Party On
Add an individual touch to invitations or cards to help your event start with a bang.
A grab bag of software can still be found in electronics stores alongside last season's tax return software. Illustrious products such as greeting card creators and the like accompany jaded graphic and video suites and font packages. Although you will find hardly any counterparts to these titles in the free software world, you do have some more intelligent alternatives.
When the task is creating invitations and place cards for an event, some Linux users might wish they had some of these Windows programs. They make life easy, with ready-made design templates into which you only have to enter names. With a little ingenuity, though, you can just as easily use gLabels [1].
First published more than 15 years ago and updated constantly, the first version of this program was intended for designing and printing labels and business cards like those available commercially. However, just as most people can manage to knock a nail into the wall with a pair of pliers, if need be, gLabels will let you create totally different and no less professional-looking printed materials. Although, gLabels is not a mature desktop publishing program like Scribus, the opportunities it offers are fine for the task at hand, and the learning curve is pleasantly flat.
The program can be found in the repositories of mainstream distributions. The current version 3.4.0 was released in April 2016, so it is likely available in the repositories – or, you can build gLabels from source (see the "Compiling gLabels" box). The mail merge function has been around for years, so the task at hand can be completed even with far older versions of the software.
Compiling gLabels
If you are building gLabels from the source code [2], you use the usual three-step process of configure
, make
, and make install
. In addition to GTK 3.x, you also need Libxml and Libsvg – all with the appropriate developer packages – as well as the XML:Parser Perl module. Other extras, such as the Zint or QRencode libraries for generating barcodes, are optional. Depending on your system's GTK configuration, the configuration script might complain about other missing libraries – but nothing too exotic – so the installation is unlikely to fail, except on BSD systems that don't get along well with GTK3.
Ready, Set, Print
After starting the program, go to the File | New menu and select the template that meets your needs. For this example, you can choose a label or card template freely from the collection.
The Generic brand in the left drop-down menu (Figure 1) contains a few common paper formats, such as the A6 format, which acts as the template in this example. After clicking Next, select the orientation (Normal or Rotated, i.e., portrait or landscape) and begin to unleash your ideas for the design.
Enabling the grid in the background (View | Grid) generally makes it easier to arrange individual objects. First, you need text, such as: "You are cordially invited to Tom and Diana's New Year's Eve party at 7:00pm." With the mail merge feature, you can invite many other guests without repeatedly entering the salutation and names, which greatly simplifies the process.
You can store the names of your guests in an external text file in the comma-separated value () format, which you can export from a spreadsheet, or you can even create the list in a simple text editor. Write each salutation and the corresponding names, separated by a comma, one after another in rows (Figure 2). The comma acts as the delimiter; the application accepts spaces in the rows without problem.
Fresh Text
Now you can insert the text into the drawing area in gLabels by clicking the T in the toolbar or by accessing Objects | Create | Text through the menubar. Clicking on the drawing area lets you create a suitable object whose properties you can edit in the panel on the right.
To size the text frame properly, drag the green handles, and to move the text box, mouse over the border between the green handles and press and hold the left mouse button while dragging.
The text itself needs a little more attention: A decorative font in an appealing size, possibly centered on the page, adds a more aesthetic touch to your invitation. You will find the appropriate settings in the Style tab in the properties panel. Another interesting option here is the Shadow tab, where you can add a shadow in a freely selectable color and offset to the text. The software does not blur the shadow, so you should use the effects sparingly. Too little contrast and too much offset could make the text illegible. The x and y offsets can be adjusted in a granular way in increments of thousandths of an inch or tenths of a millimeter; adjusting the Opacity also improves readability.
You can insert objects, such as images, lines, and borders with or without a fill color to your heart's content. All of these objects can be accessed directly from the toolbar. Useful graphics and images are also available in the public domain (e.g., check out the Openclipart project [3]).
If you are a little too bold in your placement of objects and lose sight of one, remember that it's not really gone – just covered up by other objects, because each object has its own layer. You can bring a layer to the front or send it to the back in the Objects | Order menu. Figure 3 shows what the example looks like with a color-filled box in the background, a shaded and colored font, and a small graphic.
Batch Processing
This draft of the invitation only takes care of one invitation. To incorporate mail merge for personalized invitations, open the Objects | Merge properties menu (Figure 4). As the Format, select CSV; you may notice that the menu supports quite a few more formats, such as TSV, which uses a tab as the delimiter. For Location, specify the previously created CSV file. You could even access your Evolution address book, although you would need to add a salutation.
In the properties panel in the main window, a previously inactive Insert merge field option is now ready for use, so you only need to replace the names in the text with variables. Two entries appear: one for the salutation and one for the name. Figure 5 shows what the text looks like after this step.
Now it's time for a first print preview. Select the printer icon in the toolbar and press the Preview button in the resulting window. Your variables are of variable length, so you can't be sure how much space the text will occupy in the salutation box. Figure 6 clearly shows how the nobility still requires special attention today.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.