Product Image does not display when using PDF templates. #4070

Open
opened 2026-02-20 16:13:17 -05:00 by deekerman · 4 comments
Owner

Originally created by @jack7anderson7 on GitHub (Oct 21, 2019).

After creating a PDF Template and adding the Product image as a variable, when printing as a PDF on the Quote record it does not display the image. I have tried both .png and .jpg image types and the error still occurs.

Issue

Screenshot from 2019-10-21 10-48-04
Shown above is the PDF Template I created.

Screenshot from 2019-10-21 10-48-33
This is showing the product has an image attached

Quote_Test_Quote.pdf
Above is the result of 'Print as PDF'

Expected Behavior

Image should display correctly

Actual Behavior

Image does not display correctly

Possible Fix

Steps to Reproduce

  1. Create a Product and add an image
  2. Create a PDF template and include the variable for the product image
  3. Create a Quote and relate the Product
    4.Print Quote as PDF

Your Environment

  • SuiteCRM Version used: 7.11.8
  • Operating System and version (e.g Ubuntu 16.04): 18.04
Originally created by @jack7anderson7 on GitHub (Oct 21, 2019). After creating a PDF Template and adding the Product image as a variable, when printing as a PDF on the Quote record it does not display the image. I have tried both .png and .jpg image types and the error still occurs. #### Issue ![Screenshot from 2019-10-21 10-48-04](https://user-images.githubusercontent.com/44227185/67195209-77da3300-f3f0-11e9-9c20-7082577cb27e.png) Shown above is the PDF Template I created. ![Screenshot from 2019-10-21 10-48-33](https://user-images.githubusercontent.com/44227185/67195240-858fb880-f3f0-11e9-83e9-e8c8ebea779b.png) This is showing the product has an image attached [Quote_Test_Quote.pdf](https://github.com/salesagility/SuiteCRM/files/3750047/Quote_Test_Quote.pdf) Above is the result of 'Print as PDF' #### Expected Behavior Image should display correctly #### Actual Behavior Image does not display correctly #### Possible Fix <!--- Not obligatory, but suggest a fix or reason for the bug --> #### Steps to Reproduce 1. Create a Product and add an image 2. Create a PDF template and include the variable for the product image 3. Create a Quote and relate the Product 4.Print Quote as PDF #### Your Environment <!--- Include as many relevant details about the environment you experienced the bug in --> * SuiteCRM Version used: 7.11.8 * Operating System and version (e.g Ubuntu 16.04): 18.04
Author
Owner

@Mac-Rae commented on GitHub (Oct 21, 2019):

Hi @jack7anderson7,

This issue has been confirmed to exist and is replicable in the latest 7.10.x version.

Thanks 👍

@Mac-Rae commented on GitHub (Oct 21, 2019): Hi @jack7anderson7, This issue has been confirmed to exist and is replicable in the latest 7.10.x version. Thanks :+1:
Author
Owner

@maladrill commented on GitHub (Oct 30, 2019):

It affects all images in pdf Quotes. I replicated it in https://demo.suiteondemand.com.
SuiteCRM Logo in Quote template (https://demo.suiteondemand.com/themes/default/images/company_logo.png) is not inserted into layout.
I checked in my v 7.11.8 - code added in commit d1279ca is missing in modules/AOS_PDF_Templates/PDF_Lib/mpdf.php
Adding it does not fix the issue.

@maladrill commented on GitHub (Oct 30, 2019): It affects all images in pdf Quotes. I replicated it in https://demo.suiteondemand.com. SuiteCRM Logo in Quote template (https://demo.suiteondemand.com/themes/default/images/company_logo.png) is not inserted into layout. I checked in my v 7.11.8 - code added in commit [d1279ca](https://github.com/salesagility/SuiteCRM/commit/d1279cad9c717deb4df14c42e23b476a9d4d1344) is missing in modules/AOS_PDF_Templates/PDF_Lib/mpdf.php Adding it does not fix the issue.
Author
Owner

@Mephisztoe commented on GitHub (Oct 28, 2020):

It affects all images in pdf Quotes. I replicated it in https://demo.suiteondemand.com.
SuiteCRM Logo in Quote template (https://demo.suiteondemand.com/themes/default/images/company_logo.png) is not inserted into layout.
I checked in my v 7.11.8 - code added in commit d1279ca is missing in modules/AOS_PDF_Templates/PDF_Lib/mpdf.php
Adding it does not fix the issue.

May I ask why you added it then? ;-)

However, this problem still exists in 7.11.15.

I wanted to use this for adding signatures to the users' records and reference them within invoice templates...

@Mephisztoe commented on GitHub (Oct 28, 2020): > It affects all images in pdf Quotes. I replicated it in https://demo.suiteondemand.com. > SuiteCRM Logo in Quote template (https://demo.suiteondemand.com/themes/default/images/company_logo.png) is not inserted into layout. > I checked in my v 7.11.8 - code added in commit [d1279ca](https://github.com/salesagility/SuiteCRM/commit/d1279cad9c717deb4df14c42e23b476a9d4d1344) is missing in modules/AOS_PDF_Templates/PDF_Lib/mpdf.php > Adding it does not fix the issue. May I ask why you added it then? ;-) However, this problem still exists in 7.11.15. I wanted to use this for adding signatures to the users' records and reference them within invoice templates...
Author
Owner

@moyoussry commented on GitHub (Sep 3, 2021):

Still exist

Version 7.11.20
Sugar Version 6.5.25 (Build 344)

@moyoussry commented on GitHub (Sep 3, 2021): Still exist Version 7.11.20 Sugar Version 6.5.25 (Build 344)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SuiteCRM-SuiteCRM#4070
No description provided.