Tuhund ERP Blog
Brian   Dominic Rego
Brian Dominic Rego
31/07/2025 07:14 AM

Customising PDF Templates in Tuhund for Perfect Business Documents

Tuhund gives unmatched flexibility and control when it comes to designing PDF documents — for example, you can create an invoice template that includes dynamic customer data, line items and a QR code linking to the digital version of the invoice or a verification API endpoint — whether for invoices, quotations, salary slips, delivery notes, or even custom records. With a fully configurable HTML and CSS-based template system, you can create highly personalised documents enriched with dynamic content, themes and powerful design tools.


Accessing and Managing Templates

You can access and manage PDF templates in several ways:

From Admin Menu:

  • Path: Tuhund >> Admin >> PDF Templates

  • Create new templates or edit existing ones

On-the-Fly From Any Record:

  • When working on a document (e.g., Invoice, Delivery Note), the system shows:

    • The Document Type

    • The Template used

  • Both are clickable, allowing instant access to edit or change the associated template

This flexibility ensures that templates can be updated in real time, especially during audits, corrections, or document reviews.


Dynamic Fields with Easy Insert

Templates in Tuhund support dynamic fields that pull live data from the system. Fields are inserted using a simple syntax:

#!CUSTOMERNAME!#

These fields are available through insertable dropdown lists inside the template editor, making it easy to build personalised templates for every use case.

You can also localise fields for multi-language templates. For example:

#!CUSTOMERNAME_AR!#

This will fetch the customer's name in Arabic. Similarly, you can retrieve amounts, figures and number-in-words in Arabic or any other supported language.

Note: Unused dynamic fields are automatically removed when the PDF is generated. This means that even if you include optional blocks with dynamic values, they won’t leave empty tags behind — making the use of conditional logic entirely optional.


Bi-lingual and Multi-language Templates

Tuhund supports bilingual and multilingual templates. You can design a template with English on one side and Arabic on the other, or any other language combination.

Example:

<div style="display: flex; justify-content: space-between;">
  <div style="width: 48%;">
    <h3>Customer Name</h3>
    <p>#!CUSTOMERNAME!#</p>
  </div>
  <div style="width: 48%; direction: rtl; text-align: right; font-family: 'Arial';">
    <h3>اسم العميل</h3>
    <p>#!CUSTOMERNAME_AR!#</p>
  </div>
</div>

Language Field Examples:

  • #!CUSTOMERNAME_AR!#

  • #!NETAMOUNT_AR!#

  • #!NETAMOUNTWORDS_AR!#

Templates can also be language-bound — selected dynamically based on customer preferences or region.


Themes and Component-Level Configuration

Tuhund comes with a library of pre-designed themes that can be previewed and applied instantly. Every component within a theme is dynamic and fully customisable. This makes it possible to:

  • Apply consistent branding

  • Adjust layouts for different departments

  • Reuse design across templates

Each component in generated templates has its own distinct CSS class, allowing precise styling.


Template Types & Entity Mapping

You can create multiple templates for each type of document or record and map them to specific types. Below is a full list of supported template types in Tuhund, classified by functional modules:

Functional Area Template Types
Accounting & Finance Account Statement, Receivable Statement, Payable Statement, Credit Notes, Advance Request, Advance Note, Asset Allocation
Human Resource Salary Slip, Employee Entry, Employee Promotion, Employee Increment, Employee Transfer, Employee Exit, Employee Identity Card, Payroll Calculation, Actual Payroll Calculation, Salary Statement
Sales Inquiry, Quotation, Proforma Invoice, Tax Invoice, Sales Order, Price List, Price Label, Cart, Way Bill
Inventory Delivery Note, GRN, Packing List, Stock Journal, Internal Sale Voucher, Internal Purchase Voucher, Delivery Trip, Product Barcode / QR Code, Package Barcode / QR Code, Location Barcode / QR Code
Procurement Purchase Invoice, Purchase Order, Purchase Order Labels Sheet, Request for Quote, Debit Notes, RFP, Vendor Quotations, Tender
Services Services Report, Services Job Order, Warranty Claims, PMC, Shipping Label, Shipping Record
Production Quality Control, Job Work
Health Care Prescription, Lab Report, Discharge Summary, Case Sheet
Other Records Resource Score, Barcode Sticker, Other Records

Each document type can have:

  • Multiple template versions

  • Mapped types (e.g., Domestic vs International Invoice)

  • Separate Print and Email versions — useful for pre-printed stationery vs. email PDFs

You can create multiple templates for each type of document or record and map them to specific types. Below is a full list of supported template types in Tuhund, classified by functional modules:

Accounting and Finance

  • Account Statement

  • Receivable Statement

  • Payable Statement

  • Credit Notes

  • Advance Request

  • Advance Note

  • Asset Allocation

Human Resource

  • Salary Slip

  • Employee Entry

  • Employee Promotion

  • Employee Increment

  • Employee Transfer

  • Employee Exit

  • Employee Identity Card

  • Payroll Calculation

  • Actual Payroll Calculation

  • Salary Statement

Sales

  • Inquiry

  • Quotation

  • Proforma Invoice

  • Tax Invoice

  • Sales Order

  • Price List

  • Price Label

  • Cart

  • Way Bill

Inventory

  • Delivery Note

  • GRN

  • Packing List

  • Stock Journal

  • Internal Sale Voucher

  • Internal Purchase Voucher

  • Delivery Trip

  • Product Barcode / QR Code

  • Package Barcode / QR Code

  • Location Barcode / QR Code

Procurement

  • Purchase Invoice

  • Purchase Order

  • Purchase Order Labels Sheet

  • Request for Quote

  • Debit Notes

  • RFP

  • Vendor Quotations

  • Tender

Services

  • Services Report

  • Services Job Order

  • Warranty Claims

  • PMC

  • Shipping Label

  • Shipping Record

Production

  • Quality Control

  • Job Work

Health Care

  • Prescription

  • Lab Report

  • Discharge Summary

  • Case Sheet

Other Records

  • Resource Score

  • Barcode Sticker

  • Other Records

Each document type can have:

  • Multiple template versions

  • Mapped types (e.g., Domestic vs International Invoice)

  • Separate Print and Email versions — useful for pre-printed stationery vs. email PDFs


Layouts, Sections and Reusability

Templates can be designed in portrait or landscape and support:

  • Standard and custom page sizes

  • Multiple copies (Customer Copy, Transport Copy, File Copy)

  • Embedded or modular reusable sections (e.g., headers/footers)

Example:

<header>
  <div class="header-content">Company Header Here</div>
</header>
<footer>
  <div class="footer-content">This appears on all pages</div>
</footer>

Tables and Item Customisation

Tuhund provides advanced control over item tables:

  • Add/remove columns from configuration

  • Auto-hide unused columns

  • Rearrange via drag and drop

  • Use custom fields, images, attributes and calculated values

  • Append supplementary sections (e.g., spec sheets) dynamically

Product images and attributes (including custom ones) are available directly inside the description or dedicated columns.


QR Code and Barcode Embedding

Tuhund supports both barcode and QR code generation.

Barcode:

<span class="barcodeholder"><!--BARCODE, #!SERIAL!#--></span>
<style>.barcodeholder img { width: 30mm; height: 20mm; }</style>

QR Code:

<QRCODE color="#000000" bgcolor="#FFFFFF" width="125">#!SERIAL!#</QRCODE>

Advanced QR Code Samples:

<QRCODE width="125">
<item>
  <serial>#!SERIAL!#</serial>
  <batchno>23323</batchno>
</item>
</QRCODE>

<QRCODE>{"serial":"#!SERIAL!#","batchno":23323}</QRCODE>
<QRCODE>https://erp.tuhund.com/API/v2/20101/uRDezL</QRCODE>

Version History and Rollback

Tuhund automatically maintains a complete trail of all changes made to every PDF template.

  • Every time a template is saved, a new version is stored

  • View full change history and compare versions

  • Roll back to any previous version

This ensures safe experimentation and fast recovery.


Template Authoring Reference Guide

Quick Navigation:

Dynamic Image Embedding

Use tags like:

#!LOGO-4!# → Scaled to 96px

Image Scaling Levels (when no CSS is applied):

0 → Original
1 → 32px ... up to 11 → 2048px

If CSS is specified, the system selects the next higher resolution image to avoid blurring.

Conditional Blocks (Optional)

#!IFIRN!# ... #!ENDIF!#

Completely optional — unused dynamic fields are removed automatically.

Looping Tables

Use #!ITEMSTABLE!# to auto-generate item rows with dynamic logic, sorting and formatting.

Fonts and RTL Support

Embed fonts using:

<style>@import url('https://fonts.googleapis.com/...');</style>

Use direction: rtl for Arabic and Hebrew.

<meta name="dims" value="210,297,43,5,20,5,43,20">

Structure: Width, Height, Top, Left, HeaderGap, Right, Bottom, FooterGap

Access Control

  • Templates editable only by users with permissions

  • All edits logged; rollback available

Preview and Testing

  • Real-time preview during edit

  • Live record-based preview from within forms

Optimisation Tips

  • Use auto-scaling images

  • There's nothing wrong with using nested tables, but be meticulous with your HTML syntax to prevent errors

  • Minimise external assets

Template Samples

Labels :

templates

,

pdf

,

customization

,

design

,

graphics

,

html

,

css

,

email

,

print


Tuhund Logo
TUHUND®
Home About us Modules CRM HR SALES BI SERVICES MANAGEMENT INVENTORY MANAGEMENT ACCOUNTING AND FINANCE PROCUREMENT PROJECT MANAGEMENT ERP ADMINISTRATION DATA REPOSITORY API & SUB PORTALS Careers Community Blog
M Home Schedule Demo About us Community Blog
CRM HR SALES BI SERVICES MANAGEMENT INVENTORY MANAGEMENT ACCOUNTING AND FINANCE PROCUREMENT PROJECT MANAGEMENT ERP ADMINISTRATION DATA REPOSITORY API & SUB PORTALS Careers
API Documents
Request Demo