aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/chent.R5
1 files changed, 3 insertions, 2 deletions
diff --git a/R/chent.R b/R/chent.R
index f6a8b09..ae23aeb 100644
--- a/R/chent.R
+++ b/R/chent.R
@@ -194,7 +194,7 @@ chent <- R6Class("chent",
PythonInR::pyExec("d2d.DrawMolecule(mol)")
PythonInR::pyExec("d2d.FinishDrawing()")
self$svg <- PythonInR::pyGet("d2d.GetDrawingText()")
- svgfile <- tempfile(fileext = ".svg")
+ svgfile <- tempfile(fileext = ".svg")
psfile <- tempfile(fileext = ".ps")
writeLines(self$svg, svgfile)
rsvg::rsvg_ps(svgfile, psfile)
@@ -383,7 +383,8 @@ chent <- R6Class("chent",
plot(self)
dev.off()
message("Cropping file '", path, "' using pdfcrop")
- system(paste("pdfcrop --margin 10", path, path, "> /dev/null"))
+ bash_path <- shQuote(path)
+ system(paste("pdfcrop --margin 10", bash_path, bash_path, "> /dev/null"))
# Get the height of the MediaBox
head <- readLines(path, n = 20, skipNul = TRUE)

Contact - Imprint