summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-12-21 14:06:59 +0000
committerKen Sharp <ken.sharp@artifex.com>2022-12-21 14:19:56 +0000
commitcabd1d5cb9d7afc6dae670dd2d5392ec0cbad403 (patch)
treea4030a9bd95b62438ca24930b5c2631220fc9a7d
parentbabbe18ea5ca8ddcd6fa4d718febe99d2e88dd2c (diff)
downloadghostpdl-cabd1d5cb9d7afc6dae670dd2d5392ec0cbad403.tar.gz
GhostPDF - don't return an error on an isolate 'ET'
If a file has an 'ET' outside a text block we were both setting a warning *and* returning an error, so we got a 'token error' as well as the warning. Only set a warning unless PDFSTOPONWARNING is set.
-rw-r--r--pdf/pdf_text.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pdf/pdf_text.c b/pdf/pdf_text.c
index 208327923..ea27c285a 100644
--- a/pdf/pdf_text.c
+++ b/pdf/pdf_text.c
@@ -108,7 +108,9 @@ int pdfi_ET(pdf_context *ctx)
if (ctx->text.BlockDepth == 0) {
pdfi_set_warning(ctx, 0, NULL, W_PDF_ETNOTEXTBLOCK, "pdfi_ET", NULL);
- return_error(gs_error_syntaxerror);
+ if (ctx->args.pdfstoponwarning)
+ return_error(gs_error_syntaxerror);
+ return 0;
}
ctx->text.BlockDepth--;