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 $inputfile $outputfile"'); #system ('start "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf /temp/TEST.html /temp/TEST.pdf"'); #### couldn't find command '/usr/bin/wkhtmltopdf' at C:/Strawberry/perl/site/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/WKHTMLTOPDF.pm line 645 WKHTMLTOPDF::generate(WKHTMLTOPDF=HASH(0x6759d0)) called at htmlpdf.pl line 15