summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2023-03-14 17:22:56 +0000
committerKen Sharp <ken.sharp@artifex.com>2023-03-14 17:22:56 +0000
commitb87acd85cd7c0f0ca2fbcb894bd9048ceac755b4 (patch)
tree6782fcc509814eb90aa43841a44a4405d5bdc976 /pdf
parent4cdbfdfdaa819bea5471bea73b1b71d97cf97087 (diff)
downloadghostpdl-b87acd85cd7c0f0ca2fbcb894bd9048ceac755b4.tar.gz
GhostPDF - specifically check for a fatal error return from Info
Bug #706479 "Text string detected in DOCINFO cannot be represented in XMP for PDF/A1, aborting conversion." As the comment says, if we get a Fatal error returned by pdfi_doc_info() don't try and ignore it.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_doc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pdf/pdf_doc.c b/pdf/pdf_doc.c
index 41b10513d..1a6099e69 100644
--- a/pdf/pdf_doc.c
+++ b/pdf/pdf_doc.c
@@ -1703,7 +1703,11 @@ int pdfi_doc_trailer(pdf_context *ctx)
code = pdfi_doc_Info(ctx);
if (code < 0) {
pdfi_set_warning(ctx, code, NULL, W_PDF_BAD_INFO, "pdfi_doc_trailer", NULL);
- if (ctx->args.pdfstoponerror)
+ /* pdfwrite will set a Fatal error when processing the DOCINFO if it has been
+ * told to create a PDF/A. the PDFA compatibility is 2, and the file info
+ * cannot be handled. In that case, abort immediately.
+ */
+ if (ctx->args.pdfstoponerror || code == gs_error_Fatal)
goto exit;
}