Here is the code with 3 different methods, but none work and seem to be relating to what is surrounding the filenames
use WKHTMLTOPDF; $filename='test.html'; $path='/temp/'; $inputfile="$path$filename"; $outputfilename='TEST'; $ext='.pdf'; $outputfile="$path$outputfilename$ext"; my $pdf = new WKHTMLTOPDF; $pdf->_input_file('/temp/TEST.html'); $pdf->_output_file('/temp/TEST.pdf'); $pdf->_input_file('$inputfile'); $pdf->_output_file('$outputfile'); $pdf->grayscale(1); $pdf->generate; #system ("cd C:\Program Files\wkhtmltopdf\bin"); #system ('start "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf $inputfi +le $outputfile"'); #system ('start "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf /temp/TE +ST.html /temp/TEST.pdf"');
Here is the error message
couldn't find command '/usr/bin/wkhtmltopdf' at C:/Strawberry/perl/sit +e/lib/MooseX/Role/Cmd.pm line 117. MooseX::Role::Cmd::run(WKHTMLTOPDF=HASH(0x6759d0), "/temp/TEST +.html", "/temp/TEST.pdf") called at C:/Strawberry/perl/site/lib/WKHTM +LTOPDF.pm line 645 WKHTMLTOPDF::generate(WKHTMLTOPDF=HASH(0x6759d0)) called at ht +mlpdf.pl line 15
In reply to Help with WKHTMLTOPDF by justin423
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |