printing-templates

Create Jinja-based print formats, email templates, and PDF documents in Frappe.

62|23|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/lubusIN/frappe-skills --skill printing-templates-lubusin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: printing-templates
Source: https://github.com/lubusIN/frappe-skills/tree/main/printing-templates
Command: npx skills add https://github.com/lubusIN/frappe-skills --skill printing-templates-lubusin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building custom print layouts, branded PDFs, and dynamic email templates in Frappe requires knowing Jinja templating, the Frappe Jinja API, and PDF generation patterns—knowledge that AI assistants often get wrong or omit. ## Core Features & Use Cases - Jinja Print Formats: Create custom print formats with loops over child tables, currency/date formatting via frappe.format(), and translation support. - Email Templates & PDF Generation: Build dynamic email templates and generate or attach PDFs programmatically with frappe.get_print() and frappe.attach_print(). - Letter Heads & Branding: Configure letter heads so company branding appears automatically on printed documents. - Use Case: You need a branded Sales Invoice PDF with an itemized table, totals, and terms. This Skill guides the AI to write the Jinja template, format currency correctly, and attach the PDF to an outgoing email. ## Quick Start Create a custom Jinja print format for the Sales Invoice DocType showing the items table, formatted totals, and terms section, then generate it as a PDF.

Frequently Asked Questions about printing-templates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom print format in Frappe?▼

Type "new print format" in the awesomebar, set a unique name, link the target DocType, check "Custom Format", and set Print Format Type to "Jinja". Then write your Jinja HTML using doc fields and child table loops.

How to generate a PDF from a Frappe document programmatically?▼

Call frappe.get_print with the doctype, document name, print format, and as_pdf=True to get PDF bytes. Use frappe.attach_print to attach the PDF to the document or include it as an email attachment via frappe.sendmail.

What is the difference between frappe.get_all and frappe.get_list in Jinja templates?▼

frappe.get_all ignores user permissions and returns all matching records, while frappe.get_list enforces permission checks for the current session user. Use get_list when rendering data that should respect access control.

Why does my print format styling break in the generated PDF?▼

PDF generation via wkhtmltopdf does not support external stylesheets or complex CSS. Use inline style attributes, simple table-based layouts, and test in Print View before generating the PDF.

How do I prevent XSS in Frappe Jinja templates?▼

Frappe auto-escapes HTML in template output by default. Only apply the |safe filter to trusted content, and use {{ value | e }} to explicitly escape user-generated content before rendering.