Closed
Description
Sorry for moving the thread around, I got really confused with all the code.
When I try passing this as an exaple:
'..\..\..\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe http://localhost/Ponudomat/printRdy.php print.pdf'
The program returns this:
'..\..\..\Program' is not recognized as an internal or external command, operable program or batch file.
It separates the DIR into different commands because of the spaces, to fix it you need to pass the DIR within the "" and that's where the problem kicks in.
When I try:
'"..\..\..\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" http://localhost/Ponudomat/printRdy.php print.pdf'
I just keep getting the same error as the one above.
When I try adding "/ instead of " to try and force php into making a quote within a string.
This is the confusing part, when I put:
'"/..\..\..\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe"/ http://localhost/Ponudomat/printRdy.php print.pdf'
It actually runs the command and partially works. So now I got the .exe running but it gives me an error as it cannot read the parameters it needs because of the "/ so I get:
Loading pages (1/6) [> ] 0% [===> ] 5% [======> ] 10% Error: Failed loading page file:///C:/ (sometimes it will work just to ignore this error with --load-error-handling ignore) [========> ] 14% [=========> ] 15% [==========> ] 17% [============> ] 20% [=================================> ] 55% Exit with code 1 due to network error: ContentOperationNotPermittedError
Because the command is as follows getCommand:
/..\..\..\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe"/ http://localhost/Ponudomat/printRdy.php print.pdf