Creating a dynamic pdf letterhead

Certified Senior Developer

Hi folks,

As part of our requirement, we need to generate a letterhead in PDF format. The PDF should include the following:

  1. Header with the company logo and details — essentially two images:
    • Left: address & UEN
    • Right: company logo

  2. Standard document content with some dynamic fields (e.g., name, email address, reference numbers).

  3. A data table containing business information. The number of rows is dynamic (i.e., the table may have 1, 2, or n rows).

I’ve been exploring smart services that can generate a PDF with all these elements — images (for the header), dynamic text fields, and dynamic table rows. From my research, these two smart services from the Dynamic Document Generator Plug-in seem relevant:

  1. HTML to PDF

  2. XSL-FO to PDF

However, from what I understand, HTML to PDF may not fully support images (I’m not entirely sure, this seems to be a gray area). And I’m not very familiar with how to use XSL-FO for this type of transformation.

It would be really helpful if anyone could share documentation, examples, or best practices for using these smart services, especially around structuring the XML, building the XSL, and handling dynamic tables and images.

Any guidance would be greatly appreciated!

Thanks!

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data