diff options
-rw-r--r-- | pdf/pdf_annot.c | 6 | ||||
-rw-r--r-- | pdf/pdf_warnings.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pdf/pdf_annot.c b/pdf/pdf_annot.c index 52430cfcd..2af5a1cc1 100644 --- a/pdf/pdf_annot.c +++ b/pdf/pdf_annot.c @@ -243,7 +243,11 @@ static int pdfi_annot_position_AP(pdf_context *ctx, pdf_dict *annot, pdf_stream if (xscale * yscale <= 0) { dbgmprintf(ctx->memory, "ANNOT: Ignoring annotation with scale factor of 0\n"); - code = 0; + if (ctx->args.pdfstoponerror) + code = gs_note_error(gs_error_rangecheck); + else + code = 0; + pdfi_set_warning(ctx, 0, NULL, W_PDF_ZEROSCALE_ANNOT, "pdfi_annot_position_AP", ""); goto exit; } diff --git a/pdf/pdf_warnings.h b/pdf/pdf_warnings.h index fd49710f6..1496ea332 100644 --- a/pdf/pdf_warnings.h +++ b/pdf/pdf_warnings.h @@ -76,4 +76,5 @@ PARAM(W_PDF_BAD_ACROFORM, "Bad AcroForm detected"), PARAM(W_PDF_BAD_OUTPUTINTENTS, "Bad OutputIntents detected"), PARAM(W_PDF_BAD_PAGELABELS, "A problem was encountered trying to preserve the page Labels"), PARAM(W_PDF_XREF_OBJECT0_NOT_FREE, "Xref entry for object 0 not a free entry."), +PARAM(W_PDF_ZEROSCALE_ANNOT, "Annotation has a scale factor of zero and was ignored"), #undef PARAM |