Create PDF with a button

Hello fellow doc makers,

Over the years it has been asked many times: a button function to create a PDF file. Coda has a native “print & pdf” function, but for occasional users it is hard to find and you have to define some parameters for every print job, which might be be easy for regulars, but not that easy for many of your users.

I have used this native print function a zillion times, but, apart from setting the options over and over, the real pain has been designing your pages (and sub-pages) to get some usable output. It can be done, but it is far from user friendly. My number one irritation has been the impossibility to define page breaks, but there are a few more.

For a while now a pack has been available to convert documents from one format to another: the CloudConvert pack, made by Codan Eric Koleda and free to use for everyone. And - CloudConvert allows you to set Page Breaks!!! (Yes, really).

There have been some other packs dedicated to creating nice PDF’s (like Documint), but they require quite a bit of setup for each print job. These packs allow you to tailor make invoices, certificates, vouchers and many more, but there is a bit of a learning curve and many times you don’t need the sophistication: you just want to print a page to PDF and you want it quick.

CloudConvert allows you to create print-job-buttons in a hurry. It is not complex to use, although there is a bit of figuring out. There are quite a few options, which look intimidating at first, but with a bit of guidance, it is useful for even very inexperienced makers. Makers that have been around for a while can do miracles with this pack.

In order to get your feet wet, I have created a sort of template document to help you implement print-buttons in your documents. This document is a work in progress, but even in it’s current unfinished state it will probably help a lot of people.

This CodeConvert pack offers many benefits for your documents. Many of you are probably using the GMail pack. But a known limitation of the GMail pack is the inability to include attachments. The workaround has been to include a link to a document stored on one of the coda servers, but the workaround has not included a simple way of creating this downloadable document. With smart use of the CloudConvert and the Gmail pack, you can create single button solutions to create a pdf and send an email with a link to this pdf. It is not exactly the same as an attachment, but it is close enough for most recipients of your emails. I will try to add a tutorial for mailing with pdf links in September - but with some perseverance, you will probably figure it out yourself.

The current document shows/explains creating PDF’s for standard print format, as well as label printing. It also gives some insight into printing (large) tables.

I am looking forward to your feedback on the document I am sharing below. This document has only one goal: helping makers create better documents. I will try to implement suggestions to better explain all the the possibilities and options.

There is one notable limitation using the CloudConvert pack: all the output uses one font only, regardless of the source. I hope this will be fixed soon.
EDIT: you can now (June 10, 2025) specify a font family!

Enjoy,
Greetings, Joost

12 Likes

what a wonderful contribution @joost_mineur , merci!

1 Like

Update: Eric was so kind to add another option to the CloudConvert pack. It is now possible to set a font-family (and some other options, like color and background color) for your output.

For me, this makes all the difference in the world - thank you @Eric_Koleda .

It will take some experimenting to figure out what is possible. You could make a table to setup styles you want to use for different outputs.

I adjusted my template doc to show that it works, but I will have to experiment to figure out what works best.

The template button is using this new option (first page) and the ‘label’ page (2nd page in the template doc) shows one way of setting up a small library of styles.

You can store your setup(s) in a coda Text control or in a table (text or canvas column).

If you copied my template doc before June 10, 2025 (11:00 AM Central Europe time of 5 AM CET USA) you have to make a fresh copy. The CloudConvert pack is automatically updated.

5 Likes

super!!! quick question: if i want arial, how do i write this?
“page_styles”, “font-family: Arial”
doesnt work.

1 Like

it worked now:
had to write: “*{ font-family: Arial; }”

2 Likes

without the asterix in it I suppose :wink:

had to write: “*{ font-family: Arial; }”

1 Like

This is indeed the correct syntax - with an asterisk

2 Likes

This is great!!! Finally a way of getting PDFs of Coda tables without weird line breaks/missing info. So much customizability too. Thank you!