If I choose ‘Print as PDF’ from my Quote module, a red ‘X’ is displayed where the image should be.
If I choose ‘Email Quotation’ the image shows without issue in the email module.
This is a field I created within the Quotes module. The image shows without issue within the Quotes module.
When I do an inspect on the image within the Quotes module this is what it shows:
I find this odd because when I add an image to the AOS_Product I get a complete web address https://
In any event, I need the image to show within the generated PDF.
SuiteCrm Version 7.11.6
Sugar Version 6.5.25 (Build 344)
As a side note, the image and the folders containing the images are all 777. I did this for testing. Still no go.
The image does go to my upload folder.
When I put my server name in front the scr image link into my browser, it does download the correct image. This must be something to do with PDF templates?
I have a similar issue with aos_products_product_image.
They display without issue everywhere but the PDF.
This looks like an issue already on GitHub: https://github.com/salesagility/SuiteCRM/issues/8105
I really wish this would get fixed. I would do it myself but I haven’t a clue where to start.
I think I can help you find the file where this is produced, although I might not be able to actually fix it with limited time availability.
From what you gathered, the problem is just the URL formation? If the URL was a bit different it would work?
I believe that may solve the issue!
Use an Absolute PATH for the images inside PDF Template. Make sure you can DIRECTLY access the Image URL from Browser. Use this path for img src value.
I created an image field within Quotes. Inside the PDF template, there is no way to use an absolute path.
What file would I edit in order for these to be made into an absolute path? AOS_PDF_Templates/templateParser.php ?
Why would i need to edit this file?
I create a log to show the $link within templateParser.php and it seems to show the link. If I follow the link directly I have no issues.
$aos_quotes_scope_of_work_image_c is an IMAGE field type? i created an Image field and attached at the top of PDF template and its working fine. Displayed the image correctly. Using SuiteCRM Version 7.10.11 / PHP7.2.10
Which CRM Version are you On?
In config.php, do you have site_url and host_name well defined?
I have them like this, notice the slight difference (and avoid any slashes “/” at the end):
'host_name' => 'www.mydomain.org',
'site_url' => 'http://www.mydomain.org',