• Resolved fermanus

    (@fermanus)


    Hi,
    I just realized that on my local site I cannot visualize invoices or packng slips. Instead In woocommerce -> pdfinvoices -> preview, I get this message: Error trying to generate document: The PHP GD extension is required, but is not installed.
    If i try to edit an older invoice in woocommerce->orders I get a more complete message.

    Exception: The PHP GD extension is required, but is not installed.
    
    C:\xampp\htdocs\mysite\wp-content\plugins\woocommerce-pdf-invoices-packing-slips\vendor\dompdf\dompdf\lib\Cpdf.php (5833)
    
    #0 C:\xampp\htdocs\mysite\wp-content\plugins\woocommerce-pdf-invoices-packing-slips\vendor\dompdf\dompdf\src\Adapter\CPDF.php(677): Dompdf\Cpdf->addPngFromFile('file://C:\\xampp...', 57.442913385827, 733.29354330709, 120, 79.5)
    #1 C:\xampp\htdocs\mysite\wp-content\plugins\woocommerce-pdf-invoices-packing-slips\vendor\dompdf\dompdf\src\Renderer\Image.php(68): Dompdf\Adapter\CPDF->image('file://C:\\xampp...', 57.442913385827, 29.096456692913, 120, 79.5, 'normal')

    …etc… total of twenty similar error lines

    I have php 8.13, wordpress 6.02, woocommerce 6.9.2 and the latest version (3.1.1) of “woocommerce-pdf-invoices-packing-slips”. Until recently the plugin worked without problems and is still working on my live site (fortunately). On my live site, I have the
    same PHP, WP, Woocommerce and woocommerce-pdf-invoices-packing-slips versions.

    What is this PHP GD extension and why should I need it?

    Thanks for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @fermanus,

    GD is an extension for PHP that need to be activated on the server side. You can check whether it’s installed or not under WooCommerce?> PDF?Invoices?> Status?> System?Configuration. If you need to activate it, please contact your hosting provider and ask them to do it.

    Thread Starter fermanus

    (@fermanus)

    Thanks for your rapid answer (this is not so common).
    Regarding PHP GD, I am the “hosting provider” (localhost) so I asked myself to activate it. Just a semi-colon to remove in PHP.ini so I could do it and the problem was solved.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    I’m glad to hear that you managed to make it work by yourself! ??

    If you don’t mind and have the time, do you think you could leave us a review?

    Thanks in advance and all the best with your store!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with “PHP GD extension not being installed”’ is closed to new replies.