1 //========================================================================
5 // Copyright 1996-2003 Glyph & Cog, LLC
7 //========================================================================
9 //========================================================================
11 // Modified under the Poppler project - http://poppler.freedesktop.org
13 // All changes made under the Poppler project to this file are licensed
14 // under GPL version 2 or later
16 // Copyright (C) 2006, 2010, 2013 Albert Astals Cid <aacid@kde.org>
17 // Copyright (C) 2012 Hib Eris <hib@hiberis.nl>
18 // Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
19 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
21 // To see a description of the changes please see the Changelog file that
22 // came with your tarball or type make ChangeLog if you are building from git
24 //========================================================================
29 #ifdef USE_GCC_PRAGMAS
35 //------------------------------------------------------------------------
37 //------------------------------------------------------------------------
43 Parser(XRef
*xrefA
, Lexer
*lexerA
, GBool allowStreamsA
);
48 // Get the next object from the input stream. If <simpleOnly> is
49 // true, do not parse compound objects (arrays, dictionaries, or
51 Object
*getObj(Object
*obj
, GBool simpleOnly
= gFalse
,
52 Guchar
*fileKey
= NULL
,
53 CryptAlgorithm encAlgorithm
= cryptRC4
, int keyLength
= 0,
54 int objNum
= 0, int objGen
= 0, int recursion
= 0,
55 GBool strict
= gFalse
);
57 Object
*getObj(Object
*obj
, int recursion
);
60 Stream
*getStream() { return lexer
->getStream(); }
62 // Get current position in file.
63 Goffset
getPos() { return lexer
->getPos(); }
67 XRef
*xref
; // the xref table for this PDF file
68 Lexer
*lexer
; // input stream
69 GBool allowStreams
; // parse stream objects?
70 Object buf1
, buf2
; // next two tokens
71 int inlineImg
; // set when inline image data is encountered
73 Stream
*makeStream(Object
*dict
, Guchar
*fileKey
,
74 CryptAlgorithm encAlgorithm
, int keyLength
,
75 int objNum
, int objGen
, int recursion
,
77 void shift(int objNum
= -1);
78 void shift(const char *cmdA
, int objNum
);