I have the following problem.
I currently create a pdf file in a different class than the controller. The PDF generation works and all I want after that is to go back to the page it came from. Thus basically just to reload/refresh the page. I need this, because the page displays different links based on if the PDF was generated or not. I click a link on my page which calls my controller, inside my controller method, I currently have this code:
$genpdf = new GenPDF(); $genpdf->generatePDFFile(); Yii::app()->getController()->redirect(array('/site/printinvoice'));
But I get a Headers Already Sent error which I suppose is because of the PDF generation. Is there another way to just go back to the current page?