summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-09-23 14:13:50 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-09-23 14:13:50 +0100
commit0de63b00287b985dfc781511640aa9883e38dfb4 (patch)
tree03344734381830081bba1dfab3b722e3fe78d556
parent664d478c19a324d73c61947d6083a4b663509f34 (diff)
downloadghostpdl-0de63b00287b985dfc781511640aa9883e38dfb4.tar.gz
GhostPDF - PDFSTOPONWARNING should include PDFSTOPONERROR
According to the documentation, if we set PDFSTOPONWARNING it sets PDFSTOPONERROR, and we weren't doing that.
-rw-r--r--pdf/pdftop.c2
-rw-r--r--psi/zpdfops.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/pdf/pdftop.c b/pdf/pdftop.c
index 9f5cfdf4c..5a0106a75 100644
--- a/pdf/pdftop.c
+++ b/pdf/pdftop.c
@@ -541,6 +541,8 @@ pdf_impl_set_param(pl_interp_implementation_t *impl,
code = plist_value_get_bool(&pvalue, &ctx->args.pdfstoponwarning);
if (code < 0)
return code;
+ if (ctx->args.pdfstoponwarning != 0)
+ ctx->args.pdfstoponerror = 1;
}
if (!strncmp(param, "NOTRANSPARENCY", 14)) {
code = plist_value_get_bool(&pvalue, &ctx->args.notransparency);
diff --git a/psi/zpdfops.c b/psi/zpdfops.c
index e55267729..1a082d638 100644
--- a/psi/zpdfops.c
+++ b/psi/zpdfops.c
@@ -1270,6 +1270,8 @@ static int zPDFInit(i_ctx_t *i_ctx_p)
if (!r_has_type(pvalueref, t_boolean))
goto error;
pdfctx->ctx->args.pdfstoponwarning = pvalueref->value.boolval;
+ if (pvalueref->value.boolval)
+ pdfctx->ctx->args.pdfstoponerror = pvalueref->value.boolval;
}
if (dict_find_string(pdictref, "NOTRANSPARENCY", &pvalueref) > 0) {