A PDF CV that fits its page limit
Three CV variants, each with its own target length. When the content does not fit, the generator shortens older roles step by step and renders again, instead of cutting text at the end of page two.
The problem
Twenty years of experience does not fit on two pages, and a recruiter will not read five. Editing a separate short CV by hand means it drifts away from the real one within months.
How dok.sh solves it
- Three variants from the same data: Java consultant, backend architect and full career. Each has its own headline, summary, highlighted skills and target number of pages.
- A page budget. The PDF is rendered, measured and, if it is too long, rendered again one step denser, with older roles shown in less detail. The loop stops as soon as the CV fits. It also tries the denser steps that are left, and keeps one of them if it removes a nearly empty last page.
- Settings in the admin: the default variant, the target pages, which sections appear, and links to open the saved PDF in each design and language.

The result
Every download is a current, two-page CV built from the same data as the site, in the variant that fits the reader.
Technologies
Java, OpenHTMLtoPDF, PDF generation
- Published: 2026-11-03
- Project: dok.sh — Portfolio and CV Platform
- Case study