Announcement

Collapse
No announcement yet.

PDF Printing Image and Image Name

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF Printing Image and Image Name

    Hello everyone!

    I am using Dompdf, and I'm trying to print a list of image thumbnails along with the image name using the {{#each}} statements.

    <tr>
    <td colspan="8" align="center"><span style="font-size: 12px;">
    {{#if photographs}}
    {{#each photographsIds}}
    <table style="table-layout: fixed; width: 100%; align: center;"><tbody>
    <tr><td align="center">{{@index}}: {{lookup photographs.name index}}<br></td>
    <td align="center">{{imageTag height=150 ./this}}<br></td></tr>
    </tbody></table>
    {{/each}}
    {{else}}<i>None.</i>{{/if}}
    </span></td>
    </tr>‚Äč

    The images are displaying perfectly, but I can't seem to find the right code to display the file name. Any ideas?

  • #2
    Never mind! I just figured it out!!!

    Comment


    • #3
      Hi, that`s great. one purpose (if not the most important) of this forum is to get answers to quaetsions. At least important as well is to share solutions. So please share your solution. This avoids to always have the same questions asked and helps others, who also would help you in case.

      Comment


      • #4
        I used {{var this ../photographsNames}} and it worked!

        Comment

        Working...
        X