Sorry for the bad, half English, half German pun. Dungeons & Printers is a re-run of my personal adventure trying to print a D&D character sheet. Today, it’s about a Pathfinder character sheet but the problem is the same.
Printing a PDF in brochure format on Linux.
Now I know, there are programs that solve this. However, I am doing this once a year maybe and I dislike installing new programs for one off tasks.
So what do we have on board, either pre-installed or because I use it regularly?
Kubuntu 18.04 ships with Okular as PDF reader and I’ve installed pdftk because I need it. A lot. Really. I suck at PDFs.
Now dyslexic-charactersheets.com has some marvelous stuff for D&D and Pathfinder. Sheets usually contain five pages, out of which the first for should be in my print. The fifth page is a cutout and will be printed separately.
I want a Din A3 page that contains my four Din A4 pages in a nice, foldable manner so that when “closed”, the sheet shows the character overview with the Pathfinder logo. Open it, and you’ll be presented with combat stats on the left and equipment / inventory on the right. The back page is reserved for the final page which contains the character background section, as well as affiliations and whatnot.
Okular does support dual side and multi page printing, so printing the sheet on both sides of an A3 page is not a problem. Printing two A4 pages next to each other is also fine. The problem lies with the dual-page border.
Usually, we want to print two pages on one side and then flip over the short end of the A3 page, as we are printing in landscape mode.
Unfortunately, Okular is having none of that so we can only print duplex along the long side. This means, that two of our A4 pages will be upside down when flipping through the sheets.
This issue solved itself automagically somehow. I’ll just pretend it didn’t and will show the solution here regardless. Maybe you are less lucky than me.
The second problem is, that the first two pages are printed on one side of the A3 page and the last two are printed on the backside. This leads to the third page being the front page and the first and second page to be in the middle. The fourth page is the only one that’s in the right spot, followed by the fifth page which takes up a small section of an entire A3 sheet on its own.
We want to
- reorder the pages
- flip the two first pages on their head
- drop the fifth completely
- and then printing the sheet in Okular
- with 2x1 (2 pages on one page)
- in landscape mode
- on A3 paper.
Easy peasy right? Right!
Thanks to pdftk, this all can be done in one fell swoop.
pdftk character.pdf cat 1down 4down 2 3 output character-print.pdf
This is simply amazing, as it reorders the pages in the order of 1,4,2,3 and drops the fifth (or any unmentioned) page completely.
At the same time we can flip pages or turn them if we wanted to, by adding the desired keyword directly to the page number. Like 4down and 1down above, or 4west if we would like to turn it counterclockwise by 90°.
As for output character-print.pdf, well, I’m sure you’ll figure out what it does.
Now, all we have to do is open our new PDF in Okular and print it properly.
Next, hit that Properties button and adjust your printer settings.
Then print the sucker.
*PROFANITY*! This doesn’t seem right. After trying it again and making sure I had selected A3, I switched from Okular to opening the PDF in Firefox and printing it again with these settings.
Yes, look at that! Ladies and gentleman, we have A3!
Ok, let’s bring out some Google skills and find the proper StackExchange site that tells us how to deal with this hot mess.
Now, lets try that solution
pdfjam --outfile out.pdf --paper a3paper character-print.pdf
Of course, Okular was doing some bovine fecal matter with this new document, so Firefox it is. Again.
Same settings as before, although I noticed that the option for paper size was already set to A3. Promising…
And we have our character sheets. Just the way we like ‘em.
I wanna thank Linux, Firefox, Gimp, Inkscape, Okular and the printing options for not wasting my time. I think 90 minutes to print four pages properly is a good time. Right?! No…? Gotta stay positive.
I love printers…