codeigniter DOMPDF showing blank screen, no errors, html generating properly but pdf not generating codeigniter DOMPDF showing blank screen, no errors, html generating properly but pdf not generating codeigniter codeigniter

codeigniter DOMPDF showing blank screen, no errors, html generating properly but pdf not generating


There's two issues with your code:

1.- A small typo that goes a long way:

You're setting a paper orientation which is unknown to DomPDF here $dompdf->setPaper('A4', 'potrait'); you need to change that to portrait or DomPDF may not really understand what you want and fail to render.

2.- All the human-readable text (not HTML formatting) in your view is being generated with Javascript, which requires a browser rendering engine that DomPDF doesn't have (DomPDF renders server-side, not client-side, which is important to consider).

The fact that everything works fine when loading the view in the browser is because in that case your browser handles the document.write correctly. DomPDF however does not (because it's not a real DOM/JS rendering engine, it just formats a plain HTML in a way that fits in a given paper size and orientation).

Try making the text a regular non-JS HTML


Its solved.. thanks to everyone for help.. it was totally layout issue..wrong colspan was number was there in view file