Purpose
A PDF Template Container is a modular unit within a PDF Template. It allows both static and dynamic content to be structured flexibly. The separation of PDF Template Containers makes it possible to:
- Use static PDFs as backgrounds (e.g., stationery or letterhead PDFs).
- Apply specific CSS styles for better customization and branding.
- Structure documents dynamically, with certain pages remaining static and others being generated based on database content.
Parameters
A PDF Template Container is a modular unit within a PDF Template. These containers allow for both static and dynamic content, offering flexible ways to format and arrange information. Each pdf container includes:
Title
Name of the container.
PDF File
Optional background PDF for branding or layout consistency. Here you could define a background pdf, like a stationery paper (single page).
Identifier Project
Associates the template with a specific Wonderful Relations project.
Description
A brief explanation of the template’s purpose.
CSS
Custom styles for further customization. For limitations see mpdf documentation.
Each PDF Template Container may contain Template Containers similar to those used in other parts of the Wonderful Relations system, which define the actual structure of the content.
The contents of a Template Container within a PDF Template Container function analogously to those within a PDF Template itself. This means that the same mechanisms for structuring and dynamic content generation can be applied. For example, a Template Container can include tables, lists, or repeated elements generated based on database queries. This creates a flexible, reusable structure that can be adapted to various use cases.
Example CSS
.my-title-title {
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
text-align: center;
width: 373px;
height: 100px;
margin-left:302px;
padding-left: 5px;
padding-right: 5px;
color: #8D101C;
}