Show Signature Field in Print Format PDF 02

I am preparing a contract with signatures, when I print the contract, the signature appears without any problem, please see the screenshots 1 and 2 bellow:
screenshot 1

screenshot 2

the problem is when I convert the document to PDF or send it via email, I get only a blank rectangular instead of the signature, please see the screenshot 3.
screenshot 3

there’s a similar issue in this post:
Show Signature Field in Print Format PDF - Frappe Framework / Customization - Frappe Forum

the solution as being described by by @ littlehera:
“Managed to fix it by changing the src to /files/the_image_name . :smiley: Thanks all!”

but how can I change the src to files ?

I would be appreciated for any help
Thank you very much

Why are you customizing the print format via a field?
Use your contract terms and contract terms template as they are supposed to be used. Just the terms.
Then create a new print format and use HTML & Jinja to customize it based on your needs.
You can then easily display the signatures without converting them to base64.

If you didn’t like my proposed solution then make sure you fix your Jinja tags {{ like_this }}
However Im not sure if this will work as expected.

If you need step by step assistance DM me

Hi @Yamen_Zakhour
Thank you very much for your replay.
I have tried that but unfortunately it didn’t work.
here is a screenshot for a very simple print format for the contract using jinja to show only the signature.

Unfortunately here is the result of the printed out jinja signature:

instead of showing the picture, it shows the base64 text.
Thanks again :slight_smile:

the solution for this as @ littlehera: mentioned in his post is to change / convert the base64 text into a picture file inside the system, but the question how to do it inside the system?

Use img tag

<img src="{{ doc.signature }}" height="50px" width="50px">

it has worked!
Thank you very much!