0

I am trying to print a custom image in a custom pdf. This runs as a cron. Everytime I run bin/magento cron:run, it displays all the output on the terminal and crashes. Here's my code-

$imagePath = '/custom_folder/logo.png';
$image = \Zend_Pdf_Image::imageWithPath($this->_mediaDirectory->getAbsolutePath($imagePath));
$page->drawImage($image,$x+300,$y-20,$x+500,$y+50);

Thanks for your help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.