summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--print_pdf/print_pdf.module2
-rw-r--r--print_pdf/print_pdf.pages.inc2
2 files changed, 2 insertions, 2 deletions
diff --git a/print_pdf/print_pdf.module b/print_pdf/print_pdf.module
index 54d845d..d4cc8e0 100644
--- a/print_pdf/print_pdf.module
+++ b/print_pdf/print_pdf.module
@@ -618,7 +618,7 @@ function _print_pdf_wkhtmltopdf_version() {
$print_pdf_pdf_tool = variable_get('print_pdf_pdf_tool', PRINT_PDF_PDF_TOOL_DEFAULT);
$descriptor = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
- $cmd = realpath($print_pdf_pdf_tool) .' --version';
+ $cmd = '"'. realpath($print_pdf_pdf_tool) .'" --version';
$process = proc_open($cmd, $descriptor, $pipes, NULL, NULL);
if (is_resource($process)) {
$content = stream_get_contents($pipes[1]);
diff --git a/print_pdf/print_pdf.pages.inc b/print_pdf/print_pdf.pages.inc
index d8949e2..307515c 100644
--- a/print_pdf/print_pdf.pages.inc
+++ b/print_pdf/print_pdf.pages.inc
@@ -383,7 +383,7 @@ function _print_pdf_wkhtmltopdf($print, $html, $filename = NULL) {
}
$descriptor = array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
- $cmd = realpath($print_pdf_pdf_tool) ." --page-size $print_pdf_paper_size --orientation $print_pdf_page_orientation --dpi $dpi $print_pdf_wkhtmltopdf_options - -";
+ $cmd = '"'. realpath($print_pdf_pdf_tool) ."\" --page-size $print_pdf_paper_size --orientation $print_pdf_page_orientation --dpi $dpi $print_pdf_wkhtmltopdf_options - -";
$process = proc_open($cmd, $descriptor, $pipes, NULL, NULL);