I have generate invoice in ctp. and i want that generate html to my function to create pdf. My Question How to convert .ctp file to html string. Please any suggestion.
$this->viewBuilder() ->setTemplatePath('Example'); $renderedHtml = (string)$this->render('hello', 'layout');
will give you renderd html of
Thanks, that was really helpful.
You could/should just use CakePDF which will do it for you
Yes Sir, This works perfectly.