Building PDF printing and crawler fixes for a Next.js kids' coloring site
A developer running Coloryla, a free bilingual coloring pages site for children, describes the technical problems behind its simple print-and-PDF feature. Rather than use heavy libraries, they wrote a small PDF generator that embeds PNG image data directly, avoiding re-encoding and enabling aggressive caching. Browser print behavior proved inconsistent, with Safari and Chromium handling page layout differently and requiring separate rules. A share-image route, which initially fetched fonts at request time, caused slow responses and timeouts until the font was bundled locally and Redis timeouts were added. Search Console data also showed that most Googlebot requests went to images, scripts, and analytics JSON rather than HTML pages.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in