Every business sends documents to customers — quotes, invoices, contracts, proposals, and reports. SuiteCRM’s PDF template system lets you generate professional, branded documents directly from CRM records with a single click. No copying data to Word or Excel, no manual formatting, no version confusion.
This guide covers how to create, customize, and automate PDF templates in SuiteCRM — from basic quote layouts to advanced multi-section documents with calculated fields and conditional logic.
How SuiteCRM PDF Templates Work
SuiteCRM uses an HTML-based template system that converts to PDF when generated. You design the template using HTML and CSS, insert merge fields that pull data from CRM records (contact name, address, line items, totals), and when a user clicks “Generate PDF” on a Quote, Invoice, or any record, SuiteCRM renders the HTML with actual data and converts it to a downloadable PDF.
The system supports templates for Quotes, Invoices, Contracts (custom module), Letters, and any custom module you create.
Creating a Basic PDF Template
Navigate to Admin → PDF Templates (or the PDF Templates module). Click “Create PDF Template.” Select the target module (e.g., Quotes). Build your template with these components:
Company Header
Add your company logo, name, address, phone, email, and website at the top. Use an HTML table for layout with your logo image on the left and company details on the right. Style with inline CSS for consistent rendering across PDF engines.
Document Title & Number
Insert the document type (“QUOTATION” or “INVOICE”) with the record’s auto-generated number. Use merge fields like the quote number and date fields to automatically populate.
Customer Details
Insert merge fields for the billing contact and account: name, company, address, email, and phone. These pull directly from the related Contact and Account records.
Line Items Table
For Quotes and Invoices, the line items table is critical. SuiteCRM provides special merge tags for line item groups that loop through each product line, displaying product name, description, quantity, unit price, discount, and line total. Build an HTML table with these merge tags to render a professional itemized list.
Totals Section
Insert merge fields for subtotal, discount total, tax, shipping, and grand total. Style these in a summary box aligned to the right of the page.
Terms & Conditions
Add standard terms, payment instructions, validity period, and any legal disclaimers as static text at the bottom of the template.
Signature Block
Include space for signatures, printed names, dates, and title lines for both your company and the customer.
Advanced Template Techniques
Conditional Content
Use SuiteCRM’s conditional logic in templates to show or hide sections based on field values. For example, show different payment terms for domestic vs. international customers, display a “DRAFT” watermark when the quote status is not “Approved,” or include warranty information only for products in a specific category.
Custom Fonts & Styling
PDF rendering in SuiteCRM supports standard web fonts and inline CSS. For consistent branding, use your company’s font family, brand colors for headers and accent elements, and consistent spacing and alignment. Test templates thoroughly — PDF rendering can differ slightly from browser HTML rendering.
Multi-Page Documents
For complex documents (proposals, contracts), build multi-page templates with page break CSS rules, headers/footers that repeat on each page, page numbering, and table of contents for long documents.
Calculated Fields
Use SuiteCRM’s calculated fields and Logic Hooks to compute values that appear in PDFs: profit margins, payment schedules, delivery date calculations based on product lead times, or custom pricing formulas.
Automating PDF Generation
Combine PDF templates with workflow automation for hands-free document delivery. When a Quote status changes to “Approved,” automatically generate the PDF and email it to the customer. When an Invoice is created from a closed Opportunity, generate and attach the PDF to the record. When a service Case is resolved, generate a resolution summary PDF and email it to the client.
Common Template Use Cases
Sales Quotes: Professional quote with company branding, itemized products, volume discounts, validity period, and acceptance signature block.
Invoices: Detailed invoice with line items, tax calculations, payment instructions, bank details, and due date.
Contracts: Multi-page agreement with terms, scope of work, pricing, and signature blocks — generated from Opportunity or custom Contract module data.
Service Reports: Post-service visit summaries with work performed, parts used, time spent, and next steps — generated from Case records.
Proposals: Multi-section sales proposals pulling data from Opportunities, Products, and custom modules.
Troubleshooting Common Issues
Images not rendering. Use absolute URLs for images (not relative paths). Ensure the image file is accessible from the server. Base64-encoded inline images work most reliably.
Layout breaking in PDF. PDF rendering is stricter than browser HTML. Use simple table-based layouts instead of CSS flexbox/grid. Test with the actual PDF engine SuiteCRM uses (mPDF or TCPDF depending on version).
Merge fields showing raw tags. Verify the merge field variable names match exactly. Check that the template is assigned to the correct module. Run Quick Repair if fields were recently added.
Line items not displaying. Ensure you’re using the correct line item group tags (not individual field merge tags). The line item syntax differs from standard field merge tags.
For complex PDF template development, TechEsperto’s development team builds pixel-perfect templates matching your brand guidelines.Contact usfor custom template development.