Problem with Image implementation into PDF Template

1
I am trying to implement photos in a Template which is being used to create an PDF. Altough the selected photo is being shown, the Default Image is also being displayed in my pdf File. Is there a solution to the Problem? And is it possible to display more than one photo in my pdf?   Best Regards, Fabian Berger from Siemens Energy 
asked
1 answers
0

The default image is probably a configuration mistake on your side. It should always only show one image.

Regarding the option to include multiple images. Best is to create an entity like “PdfImage” (or replace ‘PDF’ with the name of the PDF for easy understanding) associated (one to many) with a PdfHelper (again, replace PDF name) and use that PdfHelper as base context for your PDF Template. Then include in the PDFImage entity an enumeration with an option for each image. Now in your PDF Template, just load the PDFImage with the matching Enumeration value for the location you require. 

If they’re static images to used in each PDF, then just add a datagrid on an Admin page where you can create new PdfImage objects with option to select the correct enumeration value and upload the image. If the images have to be dynamic, find a way to retrieve the actual image, then GetOrCreate the PdfImage object, replace the image value and then use it in your PDF.

Good luck!

answered