Organizational Research By

Surprising Reserch Topic

wkhtmltopdf codeigniter

wkhtmltopdf codeigniter  using -'codeigniter,wkhtmltopdf'

wkhtmltopdf sounds like an excellent solution...the problem is nothing happens on the exec

shell_exec("c:\wkhtmltopdf.exe"," google.pdf");

Am i doing anything wrong?

asked Sep 15, 2015 by LuciaSowden
0 votes

Related Hot Questions

3 Answers

0 votes

Can you use the "official" class?

If not, perhaps peeking into how they did things will help you out with your implementation.

// Include WKPDF class.

// Create PDF object.
$pdf = new WKPDF();
// Set PDF's HTML
$pdf->set_html('Hello Mars<.b>!');
// Convert HTML to PDF
// Output PDF. The file name is suggested to the browser.
$pdf->output(WKPDF::$PDF_EMBEDDED, 'sample.pdf');


New link, from the Githubs -

answered Sep 15, 2015 by TraFFXM
0 votes

shell_exec() only takes one parameter, but you have given it two. Try this instead:

shell_exec("c:\wkhtmltopdf.exe google.pdf");

I think that will do it. You might also consider using the exec() function.

answered Sep 15, 2015 by ShaSft
0 votes

add path to wkhtmltopdf.exe CLASS_PATH variable and in your php script use bellow code

passthru("wkhtmltopdf output.pdf",$err);

// We'll be outputting a PDF header('Content-type: application/pdf');

// It will be called downloaded.pdf header('Content-Disposition: attachment; filename="output.pdf"');

// The PDF source is in original.pdf readfile('output.pdf');

i hope this will work...

answered Sep 15, 2015 by Geri89Zckgge