cancel
Showing results for 
Search instead for 
Did you mean: 

insert an image into a pdf file

oguevel_guevel
Confirmed Champ
Confirmed Champ

hello,

I want to generate a pdf file that contains the document properties and notament image.

I created a new documentary that inherits the type rating.

I added a new property type blog that will contain an image.

I created the following automation chains :


Fetch > Context Document(s)
Conversion > Render Document
	template : myTemplate
	filename : output.html
	mimetype : text/html
	type : flt
conversion > convert to pdf
user interface > download file

myTemplate is :

Current user: ${Session.principal.name}

<H1>${This.dublincore.title}</H1>
<p>${This.dublincore.description}</p>
</br>
<p>${This.note.note}</p>
</br>
<IMG SRC="This.myDocument.myImage"/>
</br>
${This.myDocument.myImage}

How to reference the image in the IMG tag ?

thank you

3 REPLIES 3

Sun_Seng_David_
Champ on-the-rise
Champ on-the-rise

In your template, you can try to encode the image in base64 like this:

For instance:

    <img
  src="data:image/*;base64,iVBORw0KGgoAAAAN....AASUVORK5CYII="
  alt="image" />

I don't know if this works but you can give a try

Hi,

More tests...