Using magento 2, front and admin, I need to access controller in print button on sale order page to print invoice which generate pdf in front view controller. Plz.


If you need to do that, I am sure using redirect to your front end controller should be worked.

public function getPrintUrl()
    $baseUrl = $this->_urlInterface->getBaseUrl();
    return $baseUrl.'/order/printpdf/invoice_id/'.$this->getInvoice()->getId();
| improve this answer | |

Your Answer

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

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