Tag Archives: cv

Curriculum Vitae with HTML, CSS and JavaScript

Some time ago I needed to update my CV / resume because I was searching for a new job. When I looked at my current one created many years ago in Microsoft Word and later adapted to Open / Libre Office, I realized that it looks pretty outdated. Also it’s maintenance is time consuming – based on a big fat table, page breaks appear in unexpected places and there is no option to conditionally show or hide parts of the document, so I need to maintain multiple versions. While I guess solutions to these problems exist in LibreOffice, I wanted to solve them in non-WYSIWYG manner to gain greater control over the PDF generation process.

After a bit of searching, I decided to stick with familiar, ubiquitous, simple yet flexible technology – HTML, CSS with a bit of JavaScript. I found out that this combination has quite powerful typesetting capabilities – you can define manual page breaks, margins, avoid widows and orphans and do all sorts of stuff normally found in text editors. Minor rendering deficiencies, like correct hyphenation or avoiding breaking text after a header, can be fixed with a bit of JavaScript.

Resulting project is called CV, source code can be found on GitHub and here’s an example document generated by it.

I styled the output after this website, which is powered by Twenty Thirteen WordPress theme. I don’t think it’s particularly pretty, but the concept is interesting. For consistent, scriptable rendering I used wkhtmltopdf, which uses WebKit a rendering engine.