
Haml-Coffee: Haml templates where you can write inline CoffeeScript. Blade: HTML Template Compiler, inspired by Jade & Haml. (Renders directly to the HTTP response stream). marko: A fast and lightweight HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags. combyne.js: A template engine that hopefully works the way you’d expect.
Supports custom delimiters, async, whitespace control, partials, caching, plugins.
Eta: Super-fast lightweight embedded JS template engine. Not white-space sensitive, works with any language. Squirrelly: Blazing-fast template engine that supports partials, helpers, custom tags, filters, and caching. hbs: Adapter for Handlebars.js, an extension of Mustache.js template engine. EJS: Embedded JavaScript template engine. Pug: Haml-inspired template engine (formerly Jade). These template engines work “out-of-the-box” with Express: Listing here does not constitute an endorsement or recommendation from the Expressjs project team. Puppeteer needs to be able to see any stylesheets linked in your template.The packages listed below may be outdated, no longer maintained or even broken. The PDF is returned in the response as binary data with content type application/pdf CSS Then it passes the HTML to puppeteer to generate the PDF.
See Puppeteer troubleshooting How it worksĮxpress-template-to-pdf renders your existing templates to formatted html. If you trust the html content you are opening, as is likely to be the case if youĪre rendering your own templates and not accessing external sites or loading user-submitted content, then you can use the -no-sandbox option. The sandbox may also be missing from Linux environments. If running as the root user, you must use the -no-sandbox option. Note also that there are difficulties with the Chrome sandbox. & apt-get install -y google-chrome-unstable ttf-freefont \ & sh -c 'echo "deb stable main" > /etc/apt//google.list' \
# Install latest chrome dev package libs so that the bundled version of Chromium installed by Puppeteer will work # RUN wget -q -O - | apt-key add - \