Debian Codegraph @

pdf/pdf_errors.h

raw
1 /* Copyright (C) 2022-2025 Artifex Software, Inc.
2 All Rights Reserved.
3
4 This software is provided AS-IS with no warranty, either express or
5 implied.
6
7 This software is distributed under license and may not be copied,
8 modified or distributed except as expressly authorized under the terms
9 of the license contained in the file LICENSE in this distribution.
10
11 Refer to licensing information at http://www.artifex.com or contact
12 Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
13 CA 94129, USA, for further information.
14 */
15
16 #ifndef PARAM
17 #define PARAM(A,B) A
18 #endif
19 PARAM(E_PDF_NOERROR, "no error"),
20 PARAM(E_PDF_GS_LIB_ERROR, ""),
21 PARAM(E_PDF_NOHEADER, "no header detected"),
22 PARAM(E_PDF_NOHEADERVERSION, "header lacks a version number"),
23 PARAM(E_PDF_NOSTARTXREF, "no startxref token found"),
24 PARAM(E_PDF_BADSTARTXREF, "startxref offset invalid"),
25 PARAM(E_PDF_BADXREFSTREAM, "couldn't read hybrid file's XrefStm"),
26 PARAM(E_PDF_BADXREF, "error in xref table"),
27 PARAM(E_PDF_SHORTXREF, "too few entries in xref table"),
28 PARAM(E_PDF_PREV_NOT_XREF_STREAM, "The /Prev entry in an XrefStm dictionary did not point to an XrefStm"),
29 PARAM(E_PDF_MISSINGENDSTREAM, "content stream lacks endstream"),
30 PARAM(E_PDF_UNKNOWNFILTER, "request for unknown filter"),
31 PARAM(E_PDF_MISSINGWHITESPACE, "missing white space after number"),
32 PARAM(E_PDF_MALFORMEDNUMBER, "malformed number"),
33 PARAM(E_PDF_NUMBEROVERFLOW, "integer overflowed"),
34 PARAM(E_PDF_UNESCAPEDSTRING, "unbalanced or unescaped character '(' in string"),
35 PARAM(E_PDF_BADOBJNUMBER, "invalid object number"),
36 PARAM(E_PDF_MISSINGENDOBJ, "object lacks an endobj"),
37 PARAM(E_PDF_TOKENERROR, "error executing PDF token"),
38 PARAM(E_PDF_KEYWORDTOOLONG, "potential token is too long"),
39 PARAM(E_PDF_BADPAGETYPE, "Page object does not have /Page type"),
40 PARAM(E_PDF_CIRCULARREF, "circular reference to indirect object"),
41 PARAM(E_PDF_CIRCULARNAME, "Definition of a name is a reference to itself"),
42 PARAM(E_PDF_UNREPAIRABLE, "Can't repair xref, repair already performed"),
43 PARAM(E_PDF_REPAIRED, "xref table was repaired"),
44 PARAM(E_PDF_BADSTREAM, "error reading a stream"),
45 PARAM(E_PDF_MISSINGOBJ, "obj token missing"),
46 PARAM(E_PDF_BADPAGEDICT, "error in Page dictionary"),
47 PARAM(E_PDF_OUTOFMEMORY, "out of memory"),
48 PARAM(E_PDF_PAGEDICTERROR, "error reading page dictionary"),
49 PARAM(E_PDF_STACKUNDERFLOWERROR, "stack underflow"),
50 PARAM(E_PDF_BADSTREAMDICT, "error in stream dictionary"),
51 PARAM(E_PDF_INHERITED_STREAM_RESOURCE, "stream inherited a resource"),
52 PARAM(E_PDF_BAD_PAGE_RESOURCES, "problem reading the Resources for a page"),
53 PARAM(E_PDF_BAD_RESOURCE, "Failed to read a type of Resource"),
54 PARAM(E_PDF_DEREF_FREE_OBJ, "Attempt to dereference a free object"),
55 PARAM(E_PDF_INVALID_TRANS_XOBJECT, "error in transparency XObject"),
56 PARAM(E_PDF_NO_SUBTYPE, "object lacks a required Subtype"),
57 PARAM(E_PDF_BAD_SUBTYPE, "Object has an unrecognised Subtype"),
58 PARAM(E_PDF_IMAGECOLOR_ERROR, "error in image colour"),
59 PARAM(E_DICT_SELF_REFERENCE, "dictionary contains a key which (indirectly) references the dictionary."),
60 PARAM(E_IMAGE_MASKWITHCOLOR, "Image has both ImageMask and ColorSpace keys."),
61 PARAM(E_PDF_INVALID_DECRYPT_LEN, "Invalid /Length in Encryption dictionary (not in range 40-128 or not a multiple of 8)."),
62 PARAM(E_PDF_GROUP_NO_CS, "Group attributes dictionary is missing /CS"),
63 PARAM(E_PDF_GROUP_BAD_CS, "Group attributes dictionary has an invalid /CS"),
64 PARAM(E_BAD_GROUP_DICT, "Error retrieving Group dictionary for a page or XObject"),
65 PARAM(E_BAD_HALFTONE, "Error setting a halftone"),
66 PARAM(E_PDF_BADENCRYPT, "Encrypt diciotnary not a dictionary"),
67 PARAM(E_PDF_MISSINGTYPE, "A dictionary is missing a required /Type key."),
68 PARAM(E_PDF_NESTEDTOODEEP, "Dictionaries/arrays nested too deeply"),
69 PARAM(E_PDF_UNMATCHEDMARK, "A closing mark (] or >>) had no matching mark, ignoring the closing mark"),
70 PARAM(E_PDF_BADPAGECOUNT, "page tree root node /Count did not match the actual number of pages in the tree."),
71 PARAM(E_PDF_NO_ROOT, "Can't find the document Catalog"),
72 PARAM(E_PDF_BAD_ROOT_TYPE, "Document Catalog has incorrect /Type"),
73 PARAM(E_PDF_BAD_NAMED_DEST, "An annotation has an invalid named destination"),
74 PARAM(E_PDF_BAD_LENGTH, "Incorrect /Length for stream object"),
75 PARAM(E_PDF_DICT_IS_STREAM, "Expected a dictionary but encountered a stream"),
76 PARAM(E_PDF_BAD_TYPE, "An object is of the wrong type"),
77 PARAM(E_PDF_BAD_VALUE, "An object has an unexpected value"),
78 PARAM(E_PDF_BAD_ANNOTATION, "There was an error in an annotation"),
79 PARAM(E_PDF_BAD_XREFSTMOFFSET, "An XRefStm value did not point to a cross reference stream"),
80 PARAM(E_PDF_SMASK_MISSING_G, "An SMask is missing the required Group (/G) key, SMask was ignored"),
81 PARAM(E_PDF_SMASK_IN_SMASK, "SMaskInData when there is already an SMask"),
82 PARAM(E_PDF_PS_XOBJECT_IGNORED, "An XObject had the Subtype /PS which is deprecated, the XObject was ignored"),
83 PARAM(E_PDF_TRANS_CHK_BADTYPE, "An object (eg XObject, Pattern) being checked for transparency had the wrong type and was not checked"),
84 PARAM(E_PDF_SPOT_CHK_BADTYPE, "An object (eg Shading) being checked for spot colours had the wrong type and was not checked"),
85 PARAM(E_PDF_BG_ISNAME, "An ExtGState dictionary has a /BG key with a value which is a name, not a function"),
86 PARAM(E_PDF_UCR_ISNAME, "An ExtGState dictionary has a /UCR key with a value which is a name, not a function"),
87 PARAM(E_PDF_TR_NAME_NOT_IDENTITY, "An ExtGState dictionary has a /TR key with a value which is a name other than /Identity"),
88 PARAM(E_PDF_ICC_BAD_N, "ICCbased space /N value does not match the number of components in the ICC profile"),
89 PARAM(E_PDF_MISSING_BBOX, "A form is missing the required /BBox key"),
90 PARAM(E_PDF_GROUP_BAD_BC_TOO_BIG, "An SMask has a /BC array with too many components. Ignoring specified BC"),
91 PARAM(E_PDF_GROUP_BAD_BC_NO_CS, "An Smask has a /BC key, but the Group attributes dictionary has no /CS. Ignoring specified BC"),
92 PARAM(E_PDF_BAD_TYPE0_CMAP, "CMap unrecoverably broken"),
93 PARAM(E_PDF_BAD_EMBEDDED_FONT, "An embedded font is invalid"),
94 PARAM(E_PDF_BAD_INDEXED_STRING, "The string data prameter for a /Indexed colour space lookup is too short"),
95 PARAM(E_PDF_EMPTY_FORM_KIDS, "Empty /Kids array in Form field."),
96 PARAM(E_PDF_BAD_JPX_CS, "JPX ColorSpace value is an unhandled type."),
97 PARAM(E_PDF_INVALID_JPX_HDR, "invalid JPX header"),
98 PARAM(E_PDF_JPX_CS_ERROR, ""),
99 PARAM(E_PDF_BAD_TTC_VERSION, "Unknown TTC header version"),
100 PARAM(E_PDF_INVALID_MATTE, "Matte for an image is invalid"),
101 #undef PARAM