Skip to content

Magento 2: Show whole HTML code(phtml file code) into PDF file and Download with the use of DOM PDF?

I have tried to do it with zend pdf but i am not able to show whole html content with the use of zend pdf.

If i want to display content of cms block , then i am not able to do it with Zend PDF. I have tried to find out class reference which can draw html with its tag.

If i pass html content in $page1->drawText($html, $x, $y); then it will display with all html tag. So i have noticed that we can do it with DOM PDF. But i am not aware about exact logic for it.

Is any other way to do it?