Jump to content

PDF with RockPdf


Frank Schneider
 Share

Recommended Posts

I try to use RockPdf

when i dump $pdf->dump(); the pdf show perfect

When i $pdf->download('pdf-filename.pdf'); it not work

It show it is no valid pdf

$pdf = $modules->get('RockPdf');
$pdf->set('SetHeader', 'This is my header text');
$pdf->write('Hello World ' . date('H:i:s'));
$pdf->write('<!-- my custom comment -->');
$pdf->html(); // output html in tracy console
$pdf->save(); // generate pdf
//$pdf->dump(); // dump pdf to iframe in tracy console
$pdf->download('pdf-filename.pdf');

What is the reason

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...