summaryrefslogtreecommitdiff
path: root/Resource
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2022-09-23 15:46:20 +0100
committerKen Sharp <ken.sharp@artifex.com>2022-09-23 15:46:20 +0100
commitb7a795345dfc692e6c37194cc484ad5bc0ce7b3c (patch)
treef0f34799735b01a4d1ceefabce1d916d7a3762d8 /Resource
parent0de63b00287b985dfc781511640aa9883e38dfb4 (diff)
downloadghostpdl-b7a795345dfc692e6c37194cc484ad5bc0ce7b3c.tar.gz
GhostPDF - Some error/warning cases not flagged with PDFSTOPON*
Bug #705900 "Ghostscript - parameter PDFSTOPONWARNING doesn't stop on all warnings and errors" The first case here is actually in the PostScript interpreter and so does not strictly affect GhostPDF. When executing 'run' on a PDF file the PostScript code checks to see if the header was at the start of the file and emits a warning if not. We now check PDFSTOPONWARNING after that and exit with an error if it is true. The xref checking (very early part of the new interpreter, predates the arguments) was repairing files without first checking if it should exit (if PDFSTOPONERROR is true).
Diffstat (limited to 'Resource')
-rw-r--r--Resource/Init/pdf_main.ps3
1 files changed, 3 insertions, 0 deletions
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps
index cf1825dfb..a20c95f54 100644
--- a/Resource/Init/pdf_main.ps
+++ b/Resource/Init/pdf_main.ps
@@ -1216,6 +1216,9 @@ currentdict /PDFSwitches undef
(%stderr) (w) file dup
( **** Warning: File has some garbage before %PDF- .\n)
writestring flushfile
+ PDFSTOPONWARNING {
+ /run cvx /unregistered signalerror
+ } if
} {
pop
} ifelse