Medical equipment catalog as code — Markdown to PDF
Challenge
A medical equipment distributor's catalog lived as a designer-made PDF: every new product or price change went through a layout designer — slow and expensive. The product range keeps growing from manufacturer brochures, and the catalog chronically lagged behind the real price list.
What was built
The catalog was turned into a source of truth in code: every product is a Markdown file with YAML front matter, sections are a YAML config, the design is an HTML/CSS template, and Chromium prints the final PDF from it. Adding a product boils down to “file + photo → one build command”.
One product = one Markdown file with YAML front matter (specs, brand, price); sections with accent colors are described in categories.yml.
HTML→PDF via Playwright/Chromium: precise typography, A4 landscape, automatic table of contents, footers and page numbering.
Content extraction from the old PDF and manufacturer brochures with PyMuPDF scripts
texts and photos were pulled automatically, no manual retyping.
Photo pipeline: product photos on black backgrounds are automatically converted to white with an edge flood-fill algorithm (numpy BFS).
Auto-gallery: extra photos are picked up by filename suffixes; undersized images are filtered out automatically.
Two template palettes
vivid v1 and restrained v2; brand logos are substituted automatically from a map.
Update workflow: raw PDF/DOCX/photos go into an _inbox, get parsed into product cards
and the catalog rebuilds with a single command.
Result
The catalog grew from 41 to 78 products across 13 sections — without a single hour of a layout designer. A new product is now a Markdown file and a photo; the full 52-page PDF rebuilds with one command in about a minute and always matches the current product range.
Tech stack
Have a similar challenge?
Discuss a projectNext case
System development
TMS platform for a freight company →