Hi.
Is it possible to insert image in odt while generating new odt for proposal for instance?
I would like to insert an image which will replace custom variable {my_custom_image} in my odt custom template.
I’ve already defined my custom variables in my module and everything is ok, but I would like if inserting image is possible also
Thanks
I’ve found the solution.
if (preg_match('/logo$/',$key)) // Image
{
if (file_exists($value)) $odfHandler->setImage($key, $value);
else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
}
else // Text
{
.....
I’ve set a new variable in my custom doc_generic_module_odt.modules.php
The key of a variable must end with ‘logo’ so the image will be set in the generated odt.
Hi milospetkovic,
I am trying to incorporate following in the Invoice
(a) a QR code for customer & Vendor
(b) a barcode for each of the product line item
I am using dolibarr version 15.0.1 and I am seeing the URL:
/viewimage.php?modulepart=barcode&generator=tcpdfbarcode&code=051123456785&encoding=EAN13 can view the barcode.
But it is not displayed in ODT generated PDF file.
Can you kindly guide where I need to change the variables / code so that I can get this barcode displayed on my ODT template generated invoice.
Thanks and Regards,
yesbee
@RiseValInfotech
Further to my previous reply, I think that the plugin InfraSPack Plus v7 also allows to integrate QR or bar codes.