summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-06-01 11:01:29 +0200
committerCarlos Garcia Campos <carlosgc@gnome.org>2010-06-01 11:01:29 +0200
commit4bcf3ff07f962712f71b2dc6dbd5f7e8f95e566a (patch)
treeebf410be0e99e5ce7c5f1c03b72a54c94226c762
parentee8c5a19138f33dd4c40da4e3def16eba48eccc1 (diff)
Make Ghostscript not look first in the current directory for library files
-rw-r--r--libspectre/spectre-device.c3
-rw-r--r--libspectre/spectre-exporter-pdf.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/libspectre/spectre-device.c b/libspectre/spectre-device.c
index 5267d09..7ca6c77 100644
--- a/libspectre/spectre-device.c
+++ b/libspectre/spectre-device.c
@@ -176,7 +176,7 @@ spectre_device_render (SpectreDevice *device,
{
SpectreGS *gs;
char **args;
- int n_args = 12;
+ int n_args = 13;
int arg = 0;
int success;
char *fmt;
@@ -219,6 +219,7 @@ spectre_device_render (SpectreDevice *device,
args[arg++] = "-dSAFER";
args[arg++] = "-dNOPAUSE";
args[arg++] = "-dNOPAGEPROMPT";
+ args[arg++] = "-P-";
args[arg++] = "-sDEVICE=display";
args[arg++] = text_alpha = _spectre_strdup_printf ("-dTextAlphaBits=%d",
rc->text_alpha_bits);
diff --git a/libspectre/spectre-exporter-pdf.c b/libspectre/spectre-exporter-pdf.c
index c763f7f..17a4900 100644
--- a/libspectre/spectre-exporter-pdf.c
+++ b/libspectre/spectre-exporter-pdf.c
@@ -27,7 +27,7 @@ static SpectreStatus
spectre_exporter_pdf_begin (SpectreExporter *exporter,
const char *filename)
{
- char *args[9];
+ char *args[10];
int arg = 0;
char *output_file;
struct document *doc = exporter->doc;
@@ -46,13 +46,14 @@ spectre_exporter_pdf_begin (SpectreExporter *exporter,
args[arg++] = "-dBATCH";
args[arg++] = "-dNOPAUSE";
args[arg++] = "-dSAFER";
+ args[arg++] = "-P-";
args[arg++] = "-sDEVICE=pdfwrite";
args[arg++] = output_file = _spectre_strdup_printf ("-sOutputFile=%s",
filename);
args[arg++] = "-c";
args[arg++] = ".setpdfwrite";
- if (!spectre_gs_run (exporter->gs, 9, args)) {
+ if (!spectre_gs_run (exporter->gs, 10, args)) {
free (output_file);
spectre_gs_free (exporter->gs);
exporter->gs = NULL;