insert an image into a pdf file


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: ${}

<IMG SRC="This.myDocument.myImage"/>

How to reference the image in the IMG tag ?

thank you

0 votes

1 answers



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

For instance:

  alt="image" />

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

0 votes


I try .. and it didn't work :-( <img … /> in a html file show the image (outside nuxeo). But the pdf obtained by an html template convert in pdf, show an empty square.


More tests… OpenOffice like LibreOffice are not able to interpret images base64 encoding in a html file.

I try on LibreOffice to save a html file with an imported image and it save the image in another file (in the same folder) with a link in the html file to this file.

So I think the only way is to indicate the path of the image in the html template. But how ? Is it possible to use resources>images ?

Hope there'll be an a positive answer here or in the question.