News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

TCPDF errors related to VM products

Started by en jie rudd, October 21, 2016, 07:10:25 AM

Previous topic - Next topic

en jie rudd

Hello everyone

I have been have recently run into an issue with TCPDF errors related to VM products. I have searched the forum and most of the discussions are pointing to the shipment images vs TCPDF, but nothing (as far as I could find) to vm products.

I have been getting a long list of 'soft 404' errors from GWMT recently and the list expends by day all end up with 'https://www.example.com/example_VM_product.html?format=pdf&tmpl=component';. When searched the the link source, there is this error report of 'TCPDF ERROR: [Image] Unable to get the size of the image: /images/stories/virtuemart/product/example_VM_product.jpg'. The list appears to be going to cover all my VM products eventually. All my product images are in jpg and they have always been (but not such issue before).

I have recently upgraded to a new template:
template: Gavick Storefront
Joomla: 3.6.3
VM: 3.0.18
tcpdf: 1.0.2

I have search the forums and my developer has tried almost all recommendations out there without luck.

Any help, advice or recommendation will be greatly appreciated.

best regards

En Jie (administrator but NOT programmer)

Studio 42

QuoteTCPDF ERROR: [Image] Unable to get the size of the image: /images/stories/virtuemart/product/example_VM_product.jpg'
dos not mean that TCPDF cannot handel this type of file, but that tcpdf do not find or cannot convert it.
So i think the probel is that image do not use full path.
TCPDF like JPATH_ROOT.'/images/stories/virtuemart/product/example_VM_product.jpg or can handel  https://www.example.com/images/stories/virtuemart/product/example_VM_product.jpg, but fail if is not configured properly with relative paths.

en jie rudd

Hello Studio 42

Thank you very much for your time and reply.

As I am not familiar with the TCPDF configuration, any advice on how this could be correctly configured?

Best regards

En Jie

GJC Web Design

there is a long post on here somewhere with me, Max and Alatak  about the path for images for TCPDF  .. from memory it was a server thing...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

There is no configuration for TCPDF. In default VM TCPDF is used for invoice creation and not in the product page.

You don't give any version history but I wonder if this would help:  http://forum.virtuemart.net/index.php?topic=135774.msg473425#msg473425
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Studio 42

VMTCPDF is for orders PDF, TCPDF is the library used by default with the PDF view, so this sould work for any component that can use format=raw.
But the current PDF document default render is not including full paths and this need fixes
(note that this was working with old tcpdf main class)
If you need a way to render any HTML as PDF read : http://studio42.github.io/joomla-pdf-document-view/index.html
And install what you need. This should work for any components adding &format=pdf in the llink.
I don't know if this fix the problem for images, but if you can install wkhtmltopdf, then you have a perfect render(see my test http://studio42.github.io/joomla-pdf-document-view/perf.html)
And to isntall it : http://studio42.github.io/joomla-pdf-document-view/install.html
You can install all class, if you watn compare results, some are big and you have to add the files manually in your Joomla folders.

jenkinhill

On a clean J3.6.3, VM3.0.18 and com_tcpdf_1.0.2 with Protostar & default VM templates there is no problem with the pdf rendering of the product page. 

Which would lead to the possibility of a Gavick template issue or the problem that some have had following "upgrade" to J3.6.3 on sites that have been upgraded from very old VM versions, solved by deleting the root/components/com_tcpdf directory.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

en jie rudd

Hello everyone

Thank you very much for your replies and support.

I have now: deleted the root/components/com_tcpdf directory (although my site was upgraded from VM 2.5 to VM 3.0.

I will monitor the error reports before taking the next step.

I will also keep this post updated.

best regards

En Jie


en jie rudd

Hello all helpers

I have been monitoring this for a few weeks now:

  • the errors are still appearing, but not the speed as before (Additional info: my admin back end is happy to create invoice for Paypal payment orders, but when was done by credit card payment, it has a message as 'force creation of invoice'. I first thought this may relate to the error, but the products with the error messages are not exclusive to these 'forced created invoices' products - seems to be random to me.
  • I deleted 'root/components/com_tcpdf' as suggested, but it just rebuilt itself somehow. This time I renamed the directory. I will watch for while again and feedback here.

Best regards

En Jie

jaak69

Hello

I ran with VM 3.0.18 and JM3.6.5 and TCPDF library from Virtuemart 3.0.18 package (com_tcpdf_1.0.2.zip - tcpdf library 6.2.12) into the same
QuoteTCPDF ERROR: [Image] Unable to get the size of the image: .......
problem in my live site.

My site is based on Joomlart JA Hawkstore template.

For probing I made fresh localhost install from JA Hawkstore quickstart (J 3.4.8 and VM 3.0.9), update Joomla and Virtuemart. Here tcpdf library version is 6.0.096 + several additional files copared with com_tcpdf_1.0.2.zip
After that I deleted from  my livesite /libraries/tcpdf folder, copied from fresh installation the tcpdf folder to live site and pdf's for products started to work.

Because pdf's for products did't work with com_tcpdf_1.0.2 and Protostar template either, I'm afraid that some misconfiguration is inside  com_tcpdf_1.0.2 library.

Jaak

Studio 42

Try to use jpg image, to be sure it's not a image format compatibility issue.