PDF Invoice, Packing Slip, Delivery Note, and Shipping Label for WooCommerce plugin allows you to have product image, company logo, or signature within the documents. Typically, the images will be rendered without any hindrance in your documents.
However, there may be instances where the images may appear corrupted or distorted within the PDF format of the WooCommerce documents.
Use mPDF add on
Our plugin supports two PDF rendering libraries namely dompdf (in-built library) and mPDF (add-on). There is a chance that some languages/special characters/image libraries won’t be supported by the in-built dompdf library that is used in the plugin to convert HTML to PDF. To fix this issue, please download and install our free mPDF add-on plugin.
For free plugin users: After installing the addon, go to Invoice/packing > General settings. Then, switch the PDF library to mPDF as shown below.
For pro plugin users: After installing the addon, go to Invoice/packing > General settings > Advanced. Then, switch the PDF library to mPDF.
Image processing library not present
It is likely that the image processing libraries (e.g: Imagick, gd) are missing in your site or is not compatible with the uploaded image format. Therefore, ensure that the library corresponding to your image format is present and also make sure to upload proper images only.
Workaround: Please cross-check that all the image processing libraries are present on your site.
Image size issue
The uploaded image size may exceed the server capacity.
Workaround: Upload images of sizes that are compatible with the server capacity.
Server request block
If the images are hosted on an external server, it is likely that your server may block external server requests.
Workaround: Contact your server team and find an optimum solution for unblocking requests.
Wrong file permissions prevent WordPress from reading files on the hosting server.
Workaround: Grant access for reading or uploading images.
Another proven workaround that we provide for the image missing issue is to insert the below-given code snippet:
- From your WordPress dashboard, go to Appearance > Theme editor.
- Then, add the below given code snippet at the bottom end of functions.php of the active theme file.