(let* ((pdf-name (string-append (basename name ".ps") ".pdf" ))
(cmd (format #f
"gs\
- -dCompatibilityLevel=1.4 \
-dSAFER\
+ -dCompatibilityLevel=1.4 \
-sPAPERSIZE=~a\
-q\
-dNOPAUSE\
(sanitize-command-option papersizename)
pdf-name
name)))
+ ;; The wrapper on windows cannot handle `=' signs,
+ ;; gs has a workaround with #.
+ (if (eq? PLATFORM 'windows)
+ (set! cmd (string-regex-substitute "=" "#" cmd)))
(if (access? pdf-name W_OK)
(delete-file pdf-name))