Thursday, May 25, 2017

Basic layout of Dompdf

<html> <head>   <style>   @page { margin: 50px; } .header, .footer {     width: 100%;     position: fixed; } .header {     top: -50px;     height:50px; } .footer {     bottom: -50px;     height:50px; } .pagenum:before {     content: counter(page); }   </style>   </head> <body> <div class="header">     <div...
Read More »

Wednesday, May 24, 2017

Cakephp and Dompdf

Here we go Download dompdf library https://github.com/dompdf/dompdf/releases/tag/v0.6.1 Extract zip file and rename dompdf and keep dompdf folder in app/vendor directory open app/config/routes.php and place following line in it Router::parseExtensions('pdf'); Now create pdf directory in app/view/layouts then create default.ctp file in app/view/layouts/pdf/ and paste following code in it <?php require_once(APP...
Read More »