views:

87

answers:

2

Hi friends,

I need to convert the html file into PDF, I am having command line for this process

C:\Program Files\Software602\Print2PDF/print2pdf.exe /iniconvert C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BPO/Praveen/OCT_08/html_files/file.ini

This is the command line to convert. But i dont know how to run this in php.

Please help me

+1  A: 

You can use the system function but you will require a PHP version which allows it: impossible in safe mode.

Vincent Robert
+1  A: 

you can use backticks: ` , you can use the exec function, the shell_exec function or the system function.

be sure to correctly sanitize your params (escapeshellargs, escapeshellcmd). all of the above will not work in php’s safe mode though

knittl
Don't forget to enclose paths with spaces in double-quotes, though.
Ian Kemp