We have updated our website to Magento 2.4.6.

We are facing Zend issue with the following


pdf = new Zend_Pdf();
$page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);


Can anyone please tell the equivalent class for the above.

Thanks, Jayashree

  • have you tries new \Zend_Pdf(); instaed of new Zend_Pdf(); ? and have a look at vendor/magento/module-sales/Model/Order/Pdf/Invoice.php
    – Pawan
    Apr 16 at 11:33
  • In Magento 2.4.6, the Zend Framework has been removed Apr 17 at 5:12

1 Answer 1


Just replace Zend_Pdf by \Zend_Pdf and Zend_Pdf_Page by \Zend_Pdf_Page

They have migrated to Laminas but there are still some Zend libraries, such as Zend PDF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.