A small Node script that generates my resume as a .docx, then converts it to a PDF and a PNG preview, all in one run.
This is my personal resume, not a general-purpose resume builder. I'm sharing the repo because the setup (JS that builds a docx and pipes it through LibreOffice and poppler) might be a decent starting point if you want to do the same thing for yours. Feel free to fork it and swap out the content.
- Builds a
.docxusing thedocxnpm package (fonts, colors, spacing, everything is defined in code, no template file). - Converts that
.docxto a.pdfusing LibreOffice, headless. - Converts the first page of that
.pdfto a.pngusingpdftoppm, for a quick preview image.
All three outputs land in the same folder as the script.
- Node.js (18+ is fine)
- LibreOffice, for the docx to pdf step
- poppler-utils, for the pdf to png step (specifically
pdftoppm)
On Fedora:
sudo dnf install libreoffice poppler-utilsOn other distros, swap dnf for whatever your package manager is, the package names are usually the same or close to it.
Note
LibreOffice and poppler-utils are only needed for the PDF and PNG conversion steps. If you're not on Linux/macOS, or you just don't have them installed, the script still generates the .docx fine, it'll only fail (with a clear error message) on the PDF and PNG steps, not the whole run.
npm install
node index.jsThat's it. You'll end up with three files: the .docx, a .pdf, and a .png preview.
Everything, text, styling, colors, spacing, lives directly in index.js. There's no config file or CLI flags. To make it yours:
- Replace the content (name, summary, experience, projects, skills)
- Change
NAVY,ACCENT, andRULEat the top if you want different colors - Adjust the page margins and font sizes if your content is longer or shorter than mine (it's tuned to fit exactly one page right now, so adding content will likely push it to a second page unless you tighten spacing elsewhere)
No warranty, no guarantees it fits your content out of the box. It's just what I use.