Hi There,
I have configured your's PrintOrderPdf. but it is not working for me. I am getting an error while I using Print Button to print Order Pdf which I mentioned in below ss. Please check and help me out with this issue. I am using Magento 2.3.5-p1.
It looks like you have manually installed into app/code. Please follow our installation steps as that will provide you with the compatible version for 2.3.5-p1.
Hi There, I have configured your's PrintOrderPdf. but it is not working for me. I am getting an error while I using Print Button to print Order Pdf which I mentioned in below ss. Please check and help me out with this issue. I am using Magento 2.3.5-p1.
public function execute() { $orderId = $this->getRequest()->getParam('order_id'); if ($orderId) { $order = $this->orderRepository->get($orderId); if ($order->getEntityId()) { $pdf = $this->orderPdfFactory->create()->getPdf([$order]); // This line is creating Problem $date = $this->date->date('Y-m-d_H-i-s'); $fileContent = ['type' => 'string', 'value' => $pdf->render(), 'rm' => true]; return $this->fileFactory->create( _('order') . '' . $date . '.pdf', $fileContent, DirectoryList::VAR_DIR, 'application/pdf' ); } } return $this->resultRedirectFactory->create()->setPath('sales/*/view'); }