Html2pdf PDF template requires php only variables

I need some help.

I have successfully created a PDF report which works well. It is produced using Html2pdf. Here is an example 8_AD_Report.zip (237.3 KB)

Where I am having a problem is where I need to do a repeat or loop with images, typically about 6 images.

At the moment I use ServerConnect with a Single Query to query the DB, and then set a Session variable with the result as follows

The Session variable is used as follows to populate the report template

<?php echo $_SESSION['for_PDF']['job_your_ref']; ?>

The template can only use HTML, basic in-line CSS and PHP (so no DMX stuff)

This works well.

Where I am having a problem is where I need to do a repeat or loop of images, typically about 6 images.

I have a second query, which is a standard (Multi) DB Query which queries a separate table and returns the file names, directory, notes, sort order etc for the images, but this does not work the same as above, probably because these need to be set as a multi level array, or something :slight_smile:

This is where I am stuck. What do I need to do to get this to work?

image

Community Page
Last updated: