2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Inline image token type

This commit is contained in:
Jay Berkenbilt 2018-01-29 20:57:04 -05:00
parent 2699ecf13e
commit fefe25030e
9 changed files with 982 additions and 851 deletions

View File

@ -1,34 +1,49 @@
2018-02-04 Jay Berkenbilt <ejb@ql.org> 2018-02-04 Jay Berkenbilt <ejb@ql.org>
* Significant lexer (tokenizer) enhancements. These are changes to * Significant lexer (tokenizer) enhancements. These are changes to
the QPDFTokenizer class. These changes are of concern only to the QPDFTokenizer class. These changes are of concern only to
people who are operating with PDF files at the lexical layer people who are operating with PDF files at the lexical layer using
using qpdf. They have little or no impact on most high-level qpdf. They have little or no impact on most high-level interfaces
interfaces or the command-line tool. or the command-line tool.
* New token types tt_space and tt_comment to recognize
whitespace and comments. this makes it possible to tokenize a New token types tt_space and tt_comment to recognize whitespace
PDF file or stream and preserve everything about it. and comments. this makes it possible to tokenize a PDF file or
* For backward compatibility, space and comment tokens are not stream and preserve everything about it.
returned by the tokenizer unless
QPDFTokenizer.includeIgnorable() is called. For backward compatibility, space and comment tokens are not
* Better handling of null bytes. These are now included in space returned by the tokenizer unless QPDFTokenizer.includeIgnorable()
tokens rather than being their own "tt_word" tokens. This is called.
should have no impact on any correct PDF file and has no
impact on output, but it may change offsets in some error Better handling of null bytes. These are now included in space
messages when trying to parse contents of bad files. Under tokens rather than being their own "tt_word" tokens. This should
default operation, qpdf does not attempt to parse content have no impact on any correct PDF file and has no impact on
streams, so this change is mostly invisible. output, but it may change offsets in some error messages when
* Bug fix to handling of bad tokens at ends of streams. Now, trying to parse contents of bad files. Under default operation,
when allowEOF() has been called, these are treated as bad tokens qpdf does not attempt to parse content streams, so this change is
(tt_bad or an exception, depending on invocation), and a mostly invisible.
separate tt_eof token is returned. Before the bad token
contents were returned as the value of a tt_eof token. tt_eof Bug fix to handling of bad tokens at ends of streams. Now, when
tokens are always empty now. allowEOF() has been called, these are treated as bad tokens
* Fix a bug that would, on rare occasions, report the offset in an (tt_bad or an exception, depending on invocation), and a
error message in the wrong space because of spaces or comments separate tt_eof token is returned. Before the bad token
adjacent to a bad token. contents were returned as the value of a tt_eof token. tt_eof
* Clarify in comments exactly where the input source is tokens are always empty now.
positioned surrounding calls to readToken and getToken.
Fix a bug that would, on rare occasions, report the offset in an
error message in the wrong space because of spaces or comments
adjacent to a bad token.
Clarify in comments exactly where the input source is positioned
surrounding calls to readToken and getToken.
* Add a new token type for inline images. This token type is only
returned by QPDFTokenizer immediately following a call to
expectInlineImage(). This change includes internal refactoring of
a handful of places that all separately handled inline images, The
logic of detecting inline images in content streams is now handled
in one place in the code. Also we are more flexible about what
characters may surround the EI operator that marks the end of an
inline image.
2018-02-04 Jay Berkenbilt <ejb@ql.org> 2018-02-04 Jay Berkenbilt <ejb@ql.org>

View File

@ -34,7 +34,8 @@ class QPDFTokenizer
public: public:
// Token type tt_eof is only returned of allowEOF() is called on // Token type tt_eof is only returned of allowEOF() is called on
// the tokenizer. tt_eof was introduced in QPDF version 4.1. // the tokenizer. tt_eof was introduced in QPDF version 4.1.
// tt_space and tt_comment were added in QPDF version 8. // tt_space, tt_comment, and tt_inline_image were added in QPDF
// version 8.
enum token_type_e enum token_type_e
{ {
tt_bad, tt_bad,
@ -54,6 +55,7 @@ class QPDFTokenizer
tt_eof, tt_eof,
tt_space, tt_space,
tt_comment, tt_comment,
tt_inline_image,
}; };
class Token class Token
@ -128,11 +130,17 @@ class QPDFTokenizer
QPDF_DLL QPDF_DLL
void includeIgnorable(); void includeIgnorable();
// Mode of operation: // There are two modes of operation: push and pull. The pull
// method is easier but requires an input source. The push method
// is more complicated but can be used to tokenize a stream of
// incoming characters in a pipeline.
// Keep presenting characters and calling getToken() until // Push mode:
// getToken() returns true. When it does, be sure to check
// unread_ch and to unread ch if it is true. // Keep presenting characters with presentCharacter() and
// presentEOF() and calling getToken() until getToken() returns
// true. When it does, be sure to check unread_ch and to unread ch
// if it is true.
// It these are called when a token is available, an exception // It these are called when a token is available, an exception
// will be thrown. // will be thrown.
@ -155,15 +163,30 @@ class QPDFTokenizer
QPDF_DLL QPDF_DLL
bool betweenTokens(); bool betweenTokens();
// Read a token from an input source. Context describes the // Pull mode:
// Read a token from an input source. Context describes the
// context in which the token is being read and is used in the // context in which the token is being read and is used in the
// exception thrown if there is an error. // exception thrown if there is an error. After a token is read,
// the position of the input source returned by input->tell()
// points to just after the token, and the input source's "last
// offset" as returned by input->getLastOffset() points to the
// beginning of the token.
QPDF_DLL QPDF_DLL
Token readToken(PointerHolder<InputSource> input, Token readToken(PointerHolder<InputSource> input,
std::string const& context, std::string const& context,
bool allow_bad = false, bool allow_bad = false,
size_t max_len = 0); size_t max_len = 0);
// Calling this method puts the tokenizer in a state for reading
// inline images. In that state, it will return all data up to and
// including the next EI token. After you call this method, the
// next call to readToken (or the token created next time getToken
// returns true) will either be tt_inline_image or tt_bad. This is
// the only way readToken returns a tt_inline_image token.
QPDF_DLL
void expectInlineImage();
private: private:
// Do not implement copy or assignment // Do not implement copy or assignment
QPDFTokenizer(QPDFTokenizer const&); QPDFTokenizer(QPDFTokenizer const&);
@ -171,10 +194,11 @@ class QPDFTokenizer
void resolveLiteral(); void resolveLiteral();
bool isSpace(char); bool isSpace(char);
bool isDelimiter(char);
enum state_e { enum state_e {
st_top, st_in_space, st_in_comment, st_in_string, st_lt, st_gt, st_top, st_in_space, st_in_comment, st_in_string, st_lt, st_gt,
st_literal, st_in_hexstring, st_token_ready st_literal, st_in_hexstring, st_inline_image, st_token_ready
}; };
class Members class Members

View File

@ -69,6 +69,12 @@ QPDFTokenizer::isSpace(char ch)
return ((ch == '\0') || QUtil::is_space(ch)); return ((ch == '\0') || QUtil::is_space(ch));
} }
bool
QPDFTokenizer::isDelimiter(char ch)
{
return (strchr(" \t\n\v\f\r()<>[]{}/%", ch) != 0);
}
void void
QPDFTokenizer::resolveLiteral() QPDFTokenizer::resolveLiteral()
{ {
@ -95,7 +101,7 @@ QPDFTokenizer::resolveLiteral()
if (ch == '\0') if (ch == '\0')
{ {
this->m->type = tt_bad; this->m->type = tt_bad;
QTC::TC("qpdf", "QPDF_Tokenizer null in name"); QTC::TC("qpdf", "QPDFTokenizer null in name");
this->m->error_message = this->m->error_message =
"null character not allowed in name token"; "null character not allowed in name token";
nval += "#00"; nval += "#00";
@ -108,7 +114,7 @@ QPDFTokenizer::resolveLiteral()
} }
else else
{ {
QTC::TC("qpdf", "QPDF_Tokenizer bad name"); QTC::TC("qpdf", "QPDFTokenizer bad name");
this->m->type = tt_bad; this->m->type = tt_bad;
this->m->error_message = "invalid name token"; this->m->error_message = "invalid name token";
nval += *p; nval += *p;
@ -209,7 +215,7 @@ QPDFTokenizer::presentCharacter(char ch)
if (ch == ')') if (ch == ')')
{ {
this->m->type = tt_bad; this->m->type = tt_bad;
QTC::TC("qpdf", "QPDF_Tokenizer bad )"); QTC::TC("qpdf", "QPDFTokenizer bad )");
this->m->error_message = "unexpected )"; this->m->error_message = "unexpected )";
this->m->state = st_token_ready; this->m->state = st_token_ready;
} }
@ -301,7 +307,7 @@ QPDFTokenizer::presentCharacter(char ch)
{ {
this->m->val = ">"; this->m->val = ">";
this->m->type = tt_bad; this->m->type = tt_bad;
QTC::TC("qpdf", "QPDF_Tokenizer bad >"); QTC::TC("qpdf", "QPDFTokenizer bad >");
this->m->error_message = "unexpected >"; this->m->error_message = "unexpected >";
this->m->unread_char = true; this->m->unread_char = true;
this->m->char_to_unread = ch; this->m->char_to_unread = ch;
@ -403,7 +409,7 @@ QPDFTokenizer::presentCharacter(char ch)
} }
else if (this->m->state == st_literal) else if (this->m->state == st_literal)
{ {
if (strchr(" \t\n\v\f\r()<>[]{}/%", ch) != 0) if (isDelimiter(ch))
{ {
// A C-locale whitespace character or delimiter terminates // A C-locale whitespace character or delimiter terminates
// token. It is important to unread the whitespace // token. It is important to unread the whitespace
@ -423,6 +429,25 @@ QPDFTokenizer::presentCharacter(char ch)
this->m->val += ch; this->m->val += ch;
} }
} }
else if (this->m->state == st_inline_image)
{
size_t len = this->m->val.length();
if ((len >= 4) &&
isDelimiter(this->m->val.at(len-4)) &&
(this->m->val.at(len-3) == 'E') &&
(this->m->val.at(len-2) == 'I') &&
isDelimiter(this->m->val.at(len-1)))
{
this->m->type = tt_inline_image;
this->m->unread_char = true;
this->m->char_to_unread = ch;
this->m->state = st_token_ready;
}
else
{
this->m->val += ch;
}
}
else else
{ {
handled = false; handled = false;
@ -468,7 +493,7 @@ QPDFTokenizer::presentCharacter(char ch)
else else
{ {
this->m->type = tt_bad; this->m->type = tt_bad;
QTC::TC("qpdf", "QPDF_Tokenizer bad hexstring character"); QTC::TC("qpdf", "QPDFTokenizer bad hexstring character");
this->m->error_message = std::string("invalid character (") + this->m->error_message = std::string("invalid character (") +
ch + ") in hexstring"; ch + ") in hexstring";
this->m->state = st_token_ready; this->m->state = st_token_ready;
@ -495,9 +520,23 @@ QPDFTokenizer::presentCharacter(char ch)
void void
QPDFTokenizer::presentEOF() QPDFTokenizer::presentEOF()
{ {
if (this->m->state == st_inline_image)
{
size_t len = this->m->val.length();
if ((len >= 3) &&
isDelimiter(this->m->val.at(len-3)) &&
(this->m->val.at(len-2) == 'E') &&
(this->m->val.at(len-1) == 'I'))
{
QTC::TC("qpdf", "QPDFTokenizer inline image at EOF");
this->m->type = tt_inline_image;
this->m->state = st_token_ready;
}
}
if (this->m->state == st_literal) if (this->m->state == st_literal)
{ {
QTC::TC("qpdf", "QPDF_Tokenizer EOF reading appendable token"); QTC::TC("qpdf", "QPDFTokenizer EOF reading appendable token");
resolveLiteral(); resolveLiteral();
} }
else if ((this->m->include_ignorable) && (this->m->state == st_in_space)) else if ((this->m->include_ignorable) && (this->m->state == st_in_space))
@ -514,7 +553,7 @@ QPDFTokenizer::presentEOF()
} }
else if (this->m->state != st_token_ready) else if (this->m->state != st_token_ready)
{ {
QTC::TC("qpdf", "QPDF_Tokenizer EOF reading token"); QTC::TC("qpdf", "QPDFTokenizer EOF reading token");
this->m->type = tt_bad; this->m->type = tt_bad;
this->m->error_message = "EOF while reading token"; this->m->error_message = "EOF while reading token";
} }
@ -522,6 +561,17 @@ QPDFTokenizer::presentEOF()
this->m->state = st_token_ready; this->m->state = st_token_ready;
} }
void
QPDFTokenizer::expectInlineImage()
{
if (this->m->state != st_top)
{
throw std::logic_error("QPDFTokenizer::expectInlineImage called"
" when tokenizer is in improper state");
}
this->m->state = st_inline_image;
}
bool bool
QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch) QPDFTokenizer::getToken(Token& token, bool& unread_char, char& ch)
{ {
@ -572,7 +622,7 @@ QPDFTokenizer::readToken(PointerHolder<InputSource> input,
presented_eof = true; presented_eof = true;
if ((this->m->type == tt_eof) && (! this->m->allow_eof)) if ((this->m->type == tt_eof) && (! this->m->allow_eof))
{ {
QTC::TC("qpdf", "QPDF_Tokenizer EOF when not allowed"); QTC::TC("qpdf", "QPDFTokenizer EOF when not allowed");
this->m->type = tt_bad; this->m->type = tt_bad;
this->m->error_message = "unexpected EOF"; this->m->error_message = "unexpected EOF";
offset = input->getLastOffset(); offset = input->getLastOffset();

View File

@ -64,11 +64,11 @@ QPDF stream length not integer 0
QPDF missing endstream 0 QPDF missing endstream 0
QPDFObjectHandle bad dictionary close 0 QPDFObjectHandle bad dictionary close 0
QPDF can't find xref 0 QPDF can't find xref 0
QPDF_Tokenizer bad ) 0 QPDFTokenizer bad ) 0
QPDF_Tokenizer bad > 0 QPDFTokenizer bad > 0
QPDF_Tokenizer bad hexstring character 0 QPDFTokenizer bad hexstring character 0
QPDF_Tokenizer null in name 0 QPDFTokenizer null in name 0
QPDF_Tokenizer bad name 0 QPDFTokenizer bad name 0
QPDF_Stream invalid filter 0 QPDF_Stream invalid filter 0
QPDF UseOutlines but no Outlines 0 QPDF UseOutlines but no Outlines 0
QPDFObjectHandle clone bool 0 QPDFObjectHandle clone bool 0
@ -233,8 +233,8 @@ QPDFWriter copy use_aes 1
QPDFObjectHandle indirect without context 0 QPDFObjectHandle indirect without context 0
QPDFObjectHandle trailing data in parse 0 QPDFObjectHandle trailing data in parse 0
qpdf pages encryption password 0 qpdf pages encryption password 0
QPDF_Tokenizer EOF reading token 0 QPDFTokenizer EOF reading token 0
QPDF_Tokenizer EOF reading appendable token 0 QPDFTokenizer EOF reading appendable token 0
QPDFWriter extra header text no newline 0 QPDFWriter extra header text no newline 0
QPDFWriter extra header text add newline 0 QPDFWriter extra header text add newline 0
QPDF bogus 0 offset 0 QPDF bogus 0 offset 0
@ -302,4 +302,5 @@ qpdf-c called qpdf_set_compress_streams 0
qpdf-c called qpdf_set_preserve_unreferenced_objects 0 qpdf-c called qpdf_set_preserve_unreferenced_objects 0
qpdf-c called qpdf_set_newline_before_endstream 0 qpdf-c called qpdf_set_newline_before_endstream 0
QPDF_Stream TIFF predictor 0 QPDF_Stream TIFF predictor 0
QPDF_Tokenizer EOF when not allowed 0 QPDFTokenizer EOF when not allowed 0
QPDFTokenizer inline image at EOF 0

View File

@ -222,307 +222,311 @@ skipping to endstream
7601: word: endstream 7601: word: endstream
7610: space: \x0a 7610: space: \x0a
7611: word: endobj 7611: word: endobj
7617: space: \x0a\x0a 7617: space: \x0a
7619: integer: 46 7618: comment: %QDF: ignore_newline
7621: space: 7638: space: \x0a\x0a
7622: integer: 0 7640: integer: 46
7623: space: 7642: space:
7624: word: obj 7643: integer: 0
7627: space: \x0a 7644: space:
7628: integer: 68 7645: word: obj
7630: space: \x0a 7648: space: \x0a
7631: word: endobj 7649: integer: 67
7637: space: \x0a\x0a 7651: space: \x0a
7639: comment: %% Contents for page 6 7652: word: endobj
7661: space: \x0a 7658: space: \x0a\x0a
7662: comment: %% Original object ID: 42 0 7660: comment: %% Contents for page 6
7689: space: \x0a 7682: space: \x0a
7690: integer: 47 7683: comment: %% Original object ID: 42 0
7692: space: 7710: space: \x0a
7693: integer: 0 7711: integer: 47
7694: space: 7713: space:
7695: word: obj 7714: integer: 0
7698: space: \x0a 7715: space:
7699: dict_open: << 7716: word: obj
7701: space: \x0a 7719: space: \x0a
7704: name: /Length 7720: dict_open: <<
7711: space: 7722: space: \x0a
7712: integer: 48 7725: name: /Length
7714: space: 7732: space:
7715: integer: 0 7733: integer: 48
7716: space: 7735: space:
7717: word: R 7736: integer: 0
7718: space: \x0a 7737: space:
7719: dict_close: >> 7738: word: R
7721: space: \x0a 7739: space: \x0a
7722: word: stream 7740: dict_close: >>
7742: space: \x0a
7743: word: stream
skipping to endstream skipping to endstream
7773: word: endstream 7794: word: endstream
7782: space: \x0a 7803: space: \x0a
7783: word: endobj 7804: word: endobj
7789: space: \x0a\x0a 7810: space: \x0a\x0a
7791: integer: 48 7812: integer: 48
7793: space: 7814: space:
7794: integer: 0 7815: integer: 0
7795: space: 7816: space:
7796: word: obj 7817: word: obj
7799: space: \x0a 7820: space: \x0a
7800: integer: 44 7821: integer: 44
7802: space: \x0a 7823: space: \x0a
7803: word: endobj 7824: word: endobj
7809: space: \x0a\x0a 7830: space: \x0a\x0a
7811: comment: %% Contents for page 7 7832: comment: %% Contents for page 7
7833: space: \x0a 7854: space: \x0a
7834: comment: %% Original object ID: 43 0 7855: comment: %% Original object ID: 43 0
7861: space: \x0a 7882: space: \x0a
7862: integer: 49 7883: integer: 49
7864: space: 7885: space:
7865: integer: 0 7886: integer: 0
7866: space: 7887: space:
7867: word: obj 7888: word: obj
7870: space: \x0a 7891: space: \x0a
7871: dict_open: << 7892: dict_open: <<
7873: space: \x0a 7894: space: \x0a
7876: name: /Length 7897: name: /Length
7883: space: 7904: space:
7884: integer: 50 7905: integer: 50
7886: space: 7907: space:
7887: integer: 0 7908: integer: 0
7888: space: 7909: space:
7889: word: R 7910: word: R
7890: space: \x0a 7911: space: \x0a
7891: dict_close: >> 7912: dict_close: >>
7893: space: \x0a 7914: space: \x0a
7894: word: stream 7915: word: stream
skipping to endstream skipping to endstream
7945: word: endstream 8241: word: endstream
7954: space: \x0a 8250: space: \x0a
7955: word: endobj 8251: word: endobj
7961: space: \x0a\x0a 8257: space: \x0a
7963: integer: 50 8258: comment: %QDF: ignore_newline
7965: space: 8278: space: \x0a\x0a
7966: integer: 0 8280: integer: 50
7967: space: 8282: space:
7968: word: obj 8283: integer: 0
7971: space: \x0a 8284: space:
7972: integer: 44 8285: word: obj
7974: space: \x0a 8288: space: \x0a
7975: word: endobj 8289: integer: 318
7981: space: \x0a\x0a 8292: space: \x0a
7983: comment: %% Contents for page 8 8293: word: endobj
8005: space: \x0a 8299: space: \x0a\x0a
8006: comment: %% Original object ID: 44 0 8301: comment: %% Contents for page 8
8033: space: \x0a 8323: space: \x0a
8034: integer: 51 8324: comment: %% Original object ID: 44 0
8036: space: 8351: space: \x0a
8037: integer: 0 8352: integer: 51
8038: space: 8354: space:
8039: word: obj 8355: integer: 0
8042: space: \x0a 8356: space:
8043: dict_open: << 8357: word: obj
8045: space: \x0a 8360: space: \x0a
8048: name: /Length 8361: dict_open: <<
8055: space: 8363: space: \x0a
8056: integer: 52 8366: name: /Length
8058: space: 8373: space:
8059: integer: 0 8374: integer: 52
8060: space: 8376: space:
8061: word: R 8377: integer: 0
8062: space: \x0a 8378: space:
8063: dict_close: >> 8379: word: R
8065: space: \x0a 8380: space: \x0a
8066: word: stream 8381: dict_close: >>
8383: space: \x0a
8384: word: stream
skipping to endstream skipping to endstream
8117: word: endstream 8435: word: endstream
8126: space: \x0a 8444: space: \x0a
8127: word: endobj 8445: word: endobj
8133: space: \x0a\x0a 8451: space: \x0a\x0a
8135: integer: 52 8453: integer: 52
8137: space: 8455: space:
8138: integer: 0 8456: integer: 0
8139: space: 8457: space:
8140: word: obj 8458: word: obj
8143: space: \x0a 8461: space: \x0a
8144: integer: 44 8462: integer: 44
8146: space: \x0a 8464: space: \x0a
8147: word: endobj 8465: word: endobj
8153: space: \x0a\x0a 8471: space: \x0a\x0a
8155: comment: %% Contents for page 9 8473: comment: %% Contents for page 9
8177: space: \x0a 8495: space: \x0a
8178: comment: %% Original object ID: 45 0 8496: comment: %% Original object ID: 45 0
8205: space: \x0a
8206: integer: 53
8208: space:
8209: integer: 0
8210: space:
8211: word: obj
8214: space: \x0a
8215: dict_open: <<
8217: space: \x0a
8220: name: /Length
8227: space:
8228: integer: 54
8230: space:
8231: integer: 0
8232: space:
8233: word: R
8234: space: \x0a
8235: dict_close: >>
8237: space: \x0a
8238: word: stream
skipping to endstream
8289: word: endstream
8298: space: \x0a
8299: word: endobj
8305: space: \x0a\x0a
8307: integer: 54
8309: space:
8310: integer: 0
8311: space:
8312: word: obj
8315: space: \x0a
8316: integer: 44
8318: space: \x0a
8319: word: endobj
8325: space: \x0a\x0a
8327: comment: %% Contents for page 10
8350: space: \x0a
8351: comment: %% Original object ID: 46 0
8378: space: \x0a
8379: integer: 55
8381: space:
8382: integer: 0
8383: space:
8384: word: obj
8387: space: \x0a
8388: dict_open: <<
8390: space: \x0a
8393: name: /Length
8400: space:
8401: integer: 56
8403: space:
8404: integer: 0
8405: space:
8406: word: R
8407: space: \x0a
8408: dict_close: >>
8410: space: \x0a
8411: word: stream
skipping to endstream
8462: word: endstream
8471: space: \x0a
8472: word: endobj
8478: space: \x0a\x0a
8480: integer: 56
8482: space:
8483: integer: 0
8484: space:
8485: word: obj
8488: space: \x0a
8489: integer: 44
8491: space: \x0a
8492: word: endobj
8498: space: \x0a\x0a
8500: comment: %% Contents for page 11
8523: space: \x0a 8523: space: \x0a
8524: comment: %% Original object ID: 47 0 8524: integer: 53
8551: space: \x0a 8526: space:
8552: integer: 57 8527: integer: 0
8554: space: 8528: space:
8555: integer: 0 8529: word: obj
8556: space: 8532: space: \x0a
8557: word: obj 8533: dict_open: <<
8560: space: \x0a 8535: space: \x0a
8561: dict_open: << 8538: name: /Length
8563: space: \x0a 8545: space:
8566: name: /Length 8546: integer: 54
8573: space: 8548: space:
8574: integer: 58 8549: integer: 0
8576: space: 8550: space:
8577: integer: 0 8551: word: R
8578: space: 8552: space: \x0a
8579: word: R 8553: dict_close: >>
8580: space: \x0a 8555: space: \x0a
8581: dict_close: >> 8556: word: stream
8583: space: \x0a
8584: word: stream
skipping to endstream skipping to endstream
8635: word: endstream 8607: word: endstream
8644: space: \x0a 8616: space: \x0a
8645: word: endobj 8617: word: endobj
8651: space: \x0a\x0a 8623: space: \x0a\x0a
8653: integer: 58 8625: integer: 54
8655: space: 8627: space:
8656: integer: 0 8628: integer: 0
8657: space: 8629: space:
8658: word: obj 8630: word: obj
8661: space: \x0a 8633: space: \x0a
8662: integer: 44 8634: integer: 44
8664: space: \x0a 8636: space: \x0a
8665: word: endobj 8637: word: endobj
8671: space: \x0a\x0a 8643: space: \x0a\x0a
8673: integer: 59 8645: comment: %% Contents for page 10
8675: space: 8668: space: \x0a
8676: integer: 0 8669: comment: %% Original object ID: 46 0
8677: space: 8696: space: \x0a
8678: word: obj 8697: integer: 55
8681: space: \x0a 8699: space:
8682: dict_open: << 8700: integer: 0
8684: space: \x0a 8701: space:
8687: name: /Type 8702: word: obj
8692: space: 8705: space: \x0a
8693: name: /XRef 8706: dict_open: <<
8698: space: \x0a 8708: space: \x0a
8701: name: /Length 8711: name: /Length
8708: space: 8718: space:
8709: integer: 240 8719: integer: 56
8712: space: \x0a
8715: name: /W
8717: space:
8718: array_open: [
8719: space:
8720: integer: 1
8721: space: 8721: space:
8722: integer: 2 8722: integer: 0
8723: space: 8723: space:
8724: integer: 1 8724: word: R
8725: space: 8725: space: \x0a
8726: array_close: ] 8726: dict_close: >>
8727: space: \x0a 8728: space: \x0a
8730: name: /Root 8729: word: stream
8735: space:
8736: integer: 2
8737: space:
8738: integer: 0
8739: space:
8740: word: R
8741: space: \x0a
8744: name: /Size
8749: space:
8750: integer: 60
8752: space: \x0a
8755: name: /ID
8758: space:
8759: array_open: [
8760: string: \x88\x04\x8e\x17\xc9a\xe0\x94\xff\xec\xe9\x8c\xb8\x8cF\xd0 (raw: <88048e17c961e094ffece98cb88c46d0>)
8794: string: \xed\xd6\x0f\xe8\xee\x87\xf8\x871\xa8o\x81\x9f\xe6Q\x99 (raw: <edd60fe8ee87f88731a86f819fe65199>)
8828: array_close: ]
8829: space: \x0a
8830: dict_close: >>
8832: space: \x0a
8833: word: stream
skipping to endstream skipping to endstream
9081: word: endstream 8780: word: endstream
9090: space: \x0a 8789: space: \x0a
9091: word: endobj 8790: word: endobj
9097: space: \x0a\x0a 8796: space: \x0a\x0a
9099: word: startxref 8798: integer: 56
9108: space: \x0a 8800: space:
9109: integer: 8673 8801: integer: 0
9113: space: \x0a 8802: space:
9114: comment: %%EOF 8803: word: obj
9119: space: \x0a 8806: space: \x0a
9120: eof 8807: integer: 44
8809: space: \x0a
8810: word: endobj
8816: space: \x0a\x0a
8818: comment: %% Contents for page 11
8841: space: \x0a
8842: comment: %% Original object ID: 47 0
8869: space: \x0a
8870: integer: 57
8872: space:
8873: integer: 0
8874: space:
8875: word: obj
8878: space: \x0a
8879: dict_open: <<
8881: space: \x0a
8884: name: /Length
8891: space:
8892: integer: 58
8894: space:
8895: integer: 0
8896: space:
8897: word: R
8898: space: \x0a
8899: dict_close: >>
8901: space: \x0a
8902: word: stream
skipping to endstream
8953: word: endstream
8962: space: \x0a
8963: word: endobj
8969: space: \x0a\x0a
8971: integer: 58
8973: space:
8974: integer: 0
8975: space:
8976: word: obj
8979: space: \x0a
8980: integer: 44
8982: space: \x0a
8983: word: endobj
8989: space: \x0a\x0a
8991: integer: 59
8993: space:
8994: integer: 0
8995: space:
8996: word: obj
8999: space: \x0a
9000: dict_open: <<
9002: space: \x0a
9005: name: /Type
9010: space:
9011: name: /XRef
9016: space: \x0a
9019: name: /Length
9026: space:
9027: integer: 240
9030: space: \x0a
9033: name: /W
9035: space:
9036: array_open: [
9037: space:
9038: integer: 1
9039: space:
9040: integer: 2
9041: space:
9042: integer: 1
9043: space:
9044: array_close: ]
9045: space: \x0a
9048: name: /Root
9053: space:
9054: integer: 2
9055: space:
9056: integer: 0
9057: space:
9058: word: R
9059: space: \x0a
9062: name: /Size
9067: space:
9068: integer: 60
9070: space: \x0a
9073: name: /ID
9076: space:
9077: array_open: [
9078: string: \x88\x04\x8e\x17\xc9a\xe0\x94\xff\xec\xe9\x8c\xb8\x8cF\xd0 (raw: <88048e17c961e094ffece98cb88c46d0>)
9112: string: \xed\xd6\x0f\xe8\xee\x87\xf8\x871\xa8o\x81\x9f\xe6Q\x99 (raw: <edd60fe8ee87f88731a86f819fe65199>)
9146: array_close: ]
9147: space: \x0a
9148: dict_close: >>
9150: space: \x0a
9151: word: stream
skipping to endstream
9399: word: endstream
9408: space: \x0a
9409: word: endobj
9415: space: \x0a\x0a
9417: word: startxref
9426: space: \x0a
9427: integer: 8991
9431: space: \x0a
9432: comment: %%EOF
9437: space: \x0a
9438: eof
--- END FILE --- --- END FILE ---
--- BEGIN PAGE 1 --- --- BEGIN PAGE 1 ---
0: word: BT 0: word: BT
@ -595,9 +599,7 @@ skipping to endstream
103: dict_close: >> 103: dict_close: >>
105: space: \x0a 105: space: \x0a
106: word: ID 106: word: ID
skipping to EI 108: inline-image: x\x9c\xc5\xd6I\x0e\xc3 \x0c\x05P|\xffC;U\xc8`\xc0\xd37\x91Z\xa9\x0b\xa6\x17\x02\xc4\x98\xda\xe6\x8f\x1b}D\xf0\xef_\xb4\xf8\x1c\xc9W\xa9\x84\x9c\xc4-\x94\x88>\xff\x87\xc0\x8d>\x94^\x01&\xae\xa1u\xe2]\x80"!\x87\x95\x08\x96\x05*\xac&\x8fE|Sy\xae \xf0d-\x80<\x9d\x19B\x010B\x05\xfa@N\x11\xea+<\x1fhl\xe8K\xd0\xee/56L\xa0\x89\x90\xe3\x19\x1e \xa3\x96\xb9\xa6>0\x06>\x15Y\x81\xf9!c\xec\\x0eY\x0c\xd8\x0f%Y\xf0\x01\xa5\xd68?&\xa0\xd6\xeb\x88}j\x92\xfb\xe8\x1d;\xab\x8d3\x9d\xc2\xd6l\x14p\xdbsH\xf6\xfbt\xfa\x01Q\x02\xd8Tt*h\xccU\xfa\xe3w\x07\xcd\xd5\xd0%\xa8)p\x96\xb3"\x95DiRj\xb9\x96D\x18YNU\x11\xd3\xd9Av\x92F\xe0&\x0d\x90\xcd\xd4u#c\x95\xc6W\x09\xf4\xdf\x89\x03W\x93O\x0d\x0aEI\x0a
352: word: EI
354: space: \x0a
355: word: BT 355: word: BT
357: space: \x0a 357: space: \x0a
360: name: /F1 360: name: /F1
@ -743,13 +745,11 @@ skipping to EI
47: word: ET 47: word: ET
49: space: \x0a\x00\x0a 49: space: \x0a\x00\x0a
52: name: /ThisMustBeLast 52: name: /ThisMustBeLast
67: space: \x0a 67: eof
68: eof
--- END PAGE 5 --- --- END PAGE 5 ---
--- BEGIN PAGE 6 --- --- BEGIN PAGE 6 ---
0: word: ID 0: word: ID
skipping to EI EI not found; resuming normal scanning
EI not found
2: space: \x0a 2: space: \x0a
5: name: /F1 5: name: /F1
8: space: 8: space:
@ -772,27 +772,37 @@ EI not found
44: eof 44: eof
--- END PAGE 6 --- --- END PAGE 6 ---
--- BEGIN PAGE 7 --- --- BEGIN PAGE 7 ---
0: word: BT 0: name: /potato
2: space: \x0a 7: space: \x0a
5: name: /F1 8: word: BI
8: space: 10: space: \x0a
9: integer: 24 11: name: /CS
11: space: 14: space:
12: word: Tf 15: name: /G
14: space: \x0a 17: name: /W
17: integer: 72
19: space: 19: space:
20: integer: 720 20: integer: 66
23: space: 22: name: /H
24: word: Td 24: space:
26: space: \x0a 25: integer: 47
29: string: Potato (raw: (Potato)) 27: name: /BPC
37: space: 31: space:
38: word: Tj 32: integer: 8
40: space: \x0a 33: name: /F
41: word: ET 35: name: /Fl
43: space: \x0a 38: name: /DP
44: eof 41: dict_open: <<
43: name: /Predictor
53: space:
54: integer: 15
56: name: /Columns
64: space:
65: integer: 66
67: dict_close: >>
69: space: \x0a
70: word: ID
72: inline-image: x\x9c\xc5\xd6I\x0e\xc3 \x0c\x05P|\xffC;U\xc8`\xc0\xd37\x91Z\xa9\x0b\xa6\x17\x02\xc4\x98\xda\xe6\x8f\x1b}D\xf0\xef_\xb4\xf8\x1c\xc9W\xa9\x84\x9c\xc4-\x94\x88>\xff\x87\xc0\x8d>\x94^\x01&\xae\xa1u\xe2]\x80"!\x87\x95\x08\x96\x05*\xac&\x8fE|Sy\xae \xf0d-\x80<\x9d\x19B\x010B\x05\xfa@N\x11\xea+<\x1fhl\xe8K\xd0\xee/56L\xa0\x89\x90\xe3\x19\x1e \xa3\x96\xb9\xa6>0\x06>\x15Y\x81\xf9!c\xec\\x0eY\x0c\xd8\x0f%Y\xf0\x01\xa5\xd68?&\xa0\xd6\xeb\x88}j\x92\xfb\xe8\x1d;\xab\x8d3\x9d\xc2\xd6l\x14p\xdbsH\xf6\xfbt\xfa\x01Q\x02\xd8Tt*h\xccU\xfa\xe3w\x07\xcd\xd5\xd0%\xa8)p\x96\xb3"\x95DiRj\xb9\x96D\x18YNU\x11\xd3\xd9Av\x92F\xe0&\x0d\x90\xcd\xd4u#c\x95\xc6W\x09\xf4\xdf\x89\x03W\x93O\x0d\x0aEI
318: eof
--- END PAGE 7 --- --- END PAGE 7 ---
--- BEGIN PAGE 8 --- --- BEGIN PAGE 8 ---
0: word: BT 0: word: BT

View File

@ -101,152 +101,152 @@ skipping to endstream
skipping to endstream skipping to endstream
7601: word: endstream 7601: word: endstream
7611: word: endobj 7611: word: endobj
7619: integer: 46 7640: integer: 46
7622: integer: 0 7643: integer: 0
7624: word: obj 7645: word: obj
7628: integer: 68 7649: integer: 67
7631: word: endobj 7652: word: endobj
7690: integer: 47 7711: integer: 47
7693: integer: 0 7714: integer: 0
7695: word: obj 7716: word: obj
7699: dict_open: << 7720: dict_open: <<
7704: name: /Length 7725: name: /Length
7712: integer: 48 7733: integer: 48
7715: integer: 0 7736: integer: 0
7717: word: R 7738: word: R
7719: dict_close: >> 7740: dict_close: >>
7722: word: stream 7743: word: stream
skipping to endstream skipping to endstream
7773: word: endstream 7794: word: endstream
7783: word: endobj 7804: word: endobj
7791: integer: 48 7812: integer: 48
7794: integer: 0 7815: integer: 0
7796: word: obj 7817: word: obj
7800: integer: 44 7821: integer: 44
7803: word: endobj 7824: word: endobj
7862: integer: 49 7883: integer: 49
7865: integer: 0 7886: integer: 0
7867: word: obj 7888: word: obj
7871: dict_open: << 7892: dict_open: <<
7876: name: /Length 7897: name: /Length
7884: integer: 50 7905: integer: 50
7887: integer: 0 7908: integer: 0
7889: word: R 7910: word: R
7891: dict_close: >> 7912: dict_close: >>
7894: word: stream 7915: word: stream
skipping to endstream skipping to endstream
7945: word: endstream 8241: word: endstream
7955: word: endobj 8251: word: endobj
7963: integer: 50 8280: integer: 50
7966: integer: 0 8283: integer: 0
7968: word: obj 8285: word: obj
7972: integer: 44 8289: integer: 318
7975: word: endobj 8293: word: endobj
8034: integer: 51 8352: integer: 51
8037: integer: 0 8355: integer: 0
8039: word: obj 8357: word: obj
8043: dict_open: << 8361: dict_open: <<
8048: name: /Length 8366: name: /Length
8056: integer: 52 8374: integer: 52
8059: integer: 0 8377: integer: 0
8061: word: R 8379: word: R
8063: dict_close: >> 8381: dict_close: >>
8066: word: stream 8384: word: stream
skipping to endstream skipping to endstream
8117: word: endstream 8435: word: endstream
8127: word: endobj 8445: word: endobj
8135: integer: 52 8453: integer: 52
8138: integer: 0 8456: integer: 0
8140: word: obj 8458: word: obj
8144: integer: 44 8462: integer: 44
8147: word: endobj 8465: word: endobj
8206: integer: 53 8524: integer: 53
8209: integer: 0 8527: integer: 0
8211: word: obj 8529: word: obj
8215: dict_open: << 8533: dict_open: <<
8220: name: /Length 8538: name: /Length
8228: integer: 54 8546: integer: 54
8231: integer: 0 8549: integer: 0
8233: word: R 8551: word: R
8235: dict_close: >> 8553: dict_close: >>
8238: word: stream 8556: word: stream
skipping to endstream skipping to endstream
8289: word: endstream 8607: word: endstream
8299: word: endobj 8617: word: endobj
8307: integer: 54 8625: integer: 54
8310: integer: 0 8628: integer: 0
8312: word: obj 8630: word: obj
8316: integer: 44 8634: integer: 44
8319: word: endobj 8637: word: endobj
8379: integer: 55 8697: integer: 55
8382: integer: 0 8700: integer: 0
8384: word: obj 8702: word: obj
8388: dict_open: << 8706: dict_open: <<
8393: name: /Length 8711: name: /Length
8401: integer: 56 8719: integer: 56
8404: integer: 0 8722: integer: 0
8406: word: R 8724: word: R
8408: dict_close: >> 8726: dict_close: >>
8411: word: stream 8729: word: stream
skipping to endstream skipping to endstream
8462: word: endstream 8780: word: endstream
8472: word: endobj 8790: word: endobj
8480: integer: 56 8798: integer: 56
8483: integer: 0 8801: integer: 0
8485: word: obj 8803: word: obj
8489: integer: 44 8807: integer: 44
8492: word: endobj 8810: word: endobj
8552: integer: 57 8870: integer: 57
8555: integer: 0 8873: integer: 0
8557: word: obj 8875: word: obj
8561: dict_open: << 8879: dict_open: <<
8566: name: /Length 8884: name: /Length
8574: integer: 58 8892: integer: 58
8577: integer: 0 8895: integer: 0
8579: word: R 8897: word: R
8581: dict_close: >> 8899: dict_close: >>
8584: word: stream 8902: word: stream
skipping to endstream skipping to endstream
8635: word: endstream 8953: word: endstream
8645: word: endobj 8963: word: endobj
8653: integer: 58 8971: integer: 58
8656: integer: 0 8974: integer: 0
8658: word: obj 8976: word: obj
8662: integer: 44 8980: integer: 44
8665: word: endobj 8983: word: endobj
8673: integer: 59 8991: integer: 59
8676: integer: 0 8994: integer: 0
8678: word: obj 8996: word: obj
8682: dict_open: << 9000: dict_open: <<
8687: name: /Type 9005: name: /Type
8693: name: /XRef 9011: name: /XRef
8701: name: /Length 9019: name: /Length
8709: integer: 240 9027: integer: 240
8715: name: /W 9033: name: /W
8718: array_open: [ 9036: array_open: [
8720: integer: 1 9038: integer: 1
8722: integer: 2 9040: integer: 2
8724: integer: 1 9042: integer: 1
8726: array_close: ] 9044: array_close: ]
8730: name: /Root 9048: name: /Root
8736: integer: 2 9054: integer: 2
8738: integer: 0 9056: integer: 0
8740: word: R 9058: word: R
8744: name: /Size 9062: name: /Size
8750: integer: 60 9068: integer: 60
8755: name: /ID 9073: name: /ID
8759: array_open: [ 9077: array_open: [
8760: string: \x88\x04\x8e\x17\xc9a\xe0\x94\xff\xec\xe9\x8c\xb8\x8cF\xd0 (raw: <88048e17c961e094ffece98cb88c46d0>) 9078: string: \x88\x04\x8e\x17\xc9a\xe0\x94\xff\xec\xe9\x8c\xb8\x8cF\xd0 (raw: <88048e17c961e094ffece98cb88c46d0>)
8794: string: \xed\xd6\x0f\xe8\xee\x87\xf8\x871\xa8o\x81\x9f\xe6Q\x99 (raw: <edd60fe8ee87f88731a86f819fe65199>) 9112: string: \xed\xd6\x0f\xe8\xee\x87\xf8\x871\xa8o\x81\x9f\xe6Q\x99 (raw: <edd60fe8ee87f88731a86f819fe65199>)
8828: array_close: ] 9146: array_close: ]
8830: dict_close: >> 9148: dict_close: >>
8833: word: stream 9151: word: stream
skipping to endstream skipping to endstream
9081: word: endstream 9399: word: endstream
9091: word: endobj 9409: word: endobj
9099: word: startxref 9417: word: startxref
9109: integer: 8673 9427: integer: 8991
9120: eof 9438: eof
--- END FILE --- --- END FILE ---
--- BEGIN PAGE 1 --- --- BEGIN PAGE 1 ---
0: word: BT 0: word: BT
@ -291,8 +291,7 @@ skipping to endstream
101: integer: 66 101: integer: 66
103: dict_close: >> 103: dict_close: >>
106: word: ID 106: word: ID
skipping to EI 108: inline-image: x\x9c\xc5\xd6I\x0e\xc3 \x0c\x05P|\xffC;U\xc8`\xc0\xd37\x91Z\xa9\x0b\xa6\x17\x02\xc4\x98\xda\xe6\x8f\x1b}D\xf0\xef_\xb4\xf8\x1c\xc9W\xa9\x84\x9c\xc4-\x94\x88>\xff\x87\xc0\x8d>\x94^\x01&\xae\xa1u\xe2]\x80"!\x87\x95\x08\x96\x05*\xac&\x8fE|Sy\xae \xf0d-\x80<\x9d\x19B\x010B\x05\xfa@N\x11\xea+<\x1fhl\xe8K\xd0\xee/56L\xa0\x89\x90\xe3\x19\x1e \xa3\x96\xb9\xa6>0\x06>\x15Y\x81\xf9!c\xec\\x0eY\x0c\xd8\x0f%Y\xf0\x01\xa5\xd68?&\xa0\xd6\xeb\x88}j\x92\xfb\xe8\x1d;\xab\x8d3\x9d\xc2\xd6l\x14p\xdbsH\xf6\xfbt\xfa\x01Q\x02\xd8Tt*h\xccU\xfa\xe3w\x07\xcd\xd5\xd0%\xa8)p\x96\xb3"\x95DiRj\xb9\x96D\x18YNU\x11\xd3\xd9Av\x92F\xe0&\x0d\x90\xcd\xd4u#c\x95\xc6W\x09\xf4\xdf\x89\x03W\x93O\x0d\x0aEI\x0a
352: word: EI
355: word: BT 355: word: BT
360: name: /F1 360: name: /F1
364: integer: 24 364: integer: 24
@ -374,12 +373,11 @@ skipping to EI
44: word: Tj 44: word: Tj
47: word: ET 47: word: ET
52: name: /ThisMustBeLast 52: name: /ThisMustBeLast
68: eof 67: eof
--- END PAGE 5 --- --- END PAGE 5 ---
--- BEGIN PAGE 6 --- --- BEGIN PAGE 6 ---
0: word: ID 0: word: ID
skipping to EI EI not found; resuming normal scanning
EI not found
5: name: /F1 5: name: /F1
9: integer: 24 9: integer: 24
12: word: Tf 12: word: Tf
@ -392,17 +390,28 @@ EI not found
44: eof 44: eof
--- END PAGE 6 --- --- END PAGE 6 ---
--- BEGIN PAGE 7 --- --- BEGIN PAGE 7 ---
0: word: BT 0: name: /potato
5: name: /F1 8: word: BI
9: integer: 24 11: name: /CS
12: word: Tf 15: name: /G
17: integer: 72 17: name: /W
20: integer: 720 20: integer: 66
24: word: Td 22: name: /H
29: string: Potato (raw: (Potato)) 25: integer: 47
38: word: Tj 27: name: /BPC
41: word: ET 32: integer: 8
44: eof 33: name: /F
35: name: /Fl
38: name: /DP
41: dict_open: <<
43: name: /Predictor
54: integer: 15
56: name: /Columns
65: integer: 66
67: dict_close: >>
70: word: ID
72: inline-image: x\x9c\xc5\xd6I\x0e\xc3 \x0c\x05P|\xffC;U\xc8`\xc0\xd37\x91Z\xa9\x0b\xa6\x17\x02\xc4\x98\xda\xe6\x8f\x1b}D\xf0\xef_\xb4\xf8\x1c\xc9W\xa9\x84\x9c\xc4-\x94\x88>\xff\x87\xc0\x8d>\x94^\x01&\xae\xa1u\xe2]\x80"!\x87\x95\x08\x96\x05*\xac&\x8fE|Sy\xae \xf0d-\x80<\x9d\x19B\x010B\x05\xfa@N\x11\xea+<\x1fhl\xe8K\xd0\xee/56L\xa0\x89\x90\xe3\x19\x1e \xa3\x96\xb9\xa6>0\x06>\x15Y\x81\xf9!c\xec\\x0eY\x0c\xd8\x0f%Y\xf0\x01\xa5\xd68?&\xa0\xd6\xeb\x88}j\x92\xfb\xe8\x1d;\xab\x8d3\x9d\xc2\xd6l\x14p\xdbsH\xf6\xfbt\xfa\x01Q\x02\xd8Tt*h\xccU\xfa\xe3w\x07\xcd\xd5\xd0%\xa8)p\x96\xb3"\x95DiRj\xb9\x96D\x18YNU\x11\xd3\xd9Av\x92F\xe0&\x0d\x90\xcd\xd4u#c\x95\xc6W\x09\xf4\xdf\x89\x03W\x93O\x0d\x0aEI
318: eof
--- END PAGE 7 --- --- END PAGE 7 ---
--- BEGIN PAGE 8 --- --- BEGIN PAGE 8 ---
0: word: BT 0: word: BT

View File

@ -222,307 +222,311 @@ skipping to endstream
7601: word: endstream 7601: word: endstream
7610: space: \x0a 7610: space: \x0a
7611: word: endobj 7611: word: endobj
7617: space: \x0a\x0a 7617: space: \x0a
7619: integer: 46 7618: comment: %QDF: ignore_newline
7621: space: 7638: space: \x0a\x0a
7622: integer: 0 7640: integer: 46
7623: space: 7642: space:
7624: word: obj 7643: integer: 0
7627: space: \x0a 7644: space:
7628: integer: 68 7645: word: obj
7630: space: \x0a 7648: space: \x0a
7631: word: endobj 7649: integer: 67
7637: space: \x0a\x0a 7651: space: \x0a
7639: comment: %% Contents for page 6 7652: word: endobj
7661: space: \x0a 7658: space: \x0a\x0a
7662: comment: %% Original object ID: 42 0 7660: comment: %% Contents for page 6
7689: space: \x0a 7682: space: \x0a
7690: integer: 47 7683: comment: %% Original object ID: 42 0
7692: space: 7710: space: \x0a
7693: integer: 0 7711: integer: 47
7694: space: 7713: space:
7695: word: obj 7714: integer: 0
7698: space: \x0a 7715: space:
7699: dict_open: << 7716: word: obj
7701: space: \x0a 7719: space: \x0a
7704: name: /Length 7720: dict_open: <<
7711: space: 7722: space: \x0a
7712: integer: 48 7725: name: /Length
7714: space: 7732: space:
7715: integer: 0 7733: integer: 48
7716: space: 7735: space:
7717: word: R 7736: integer: 0
7718: space: \x0a 7737: space:
7719: dict_close: >> 7738: word: R
7721: space: \x0a 7739: space: \x0a
7722: word: stream 7740: dict_close: >>
7742: space: \x0a
7743: word: stream
skipping to endstream skipping to endstream
7773: word: endstream 7794: word: endstream
7782: space: \x0a 7803: space: \x0a
7783: word: endobj 7804: word: endobj
7789: space: \x0a\x0a 7810: space: \x0a\x0a
7791: integer: 48 7812: integer: 48
7793: space: 7814: space:
7794: integer: 0 7815: integer: 0
7795: space: 7816: space:
7796: word: obj 7817: word: obj
7799: space: \x0a 7820: space: \x0a
7800: integer: 44 7821: integer: 44
7802: space: \x0a 7823: space: \x0a
7803: word: endobj 7824: word: endobj
7809: space: \x0a\x0a 7830: space: \x0a\x0a
7811: comment: %% Contents for page 7 7832: comment: %% Contents for page 7
7833: space: \x0a 7854: space: \x0a
7834: comment: %% Original object ID: 43 0 7855: comment: %% Original object ID: 43 0
7861: space: \x0a 7882: space: \x0a
7862: integer: 49 7883: integer: 49
7864: space: 7885: space:
7865: integer: 0 7886: integer: 0
7866: space: 7887: space:
7867: word: obj 7888: word: obj
7870: space: \x0a 7891: space: \x0a
7871: dict_open: << 7892: dict_open: <<
7873: space: \x0a 7894: space: \x0a
7876: name: /Length 7897: name: /Length
7883: space: 7904: space:
7884: integer: 50 7905: integer: 50
7886: space: 7907: space:
7887: integer: 0 7908: integer: 0
7888: space: 7909: space:
7889: word: R 7910: word: R
7890: space: \x0a 7911: space: \x0a
7891: dict_close: >> 7912: dict_close: >>
7893: space: \x0a 7914: space: \x0a
7894: word: stream 7915: word: stream
skipping to endstream skipping to endstream
7945: word: endstream 8241: word: endstream
7954: space: \x0a 8250: space: \x0a
7955: word: endobj 8251: word: endobj
7961: space: \x0a\x0a 8257: space: \x0a
7963: integer: 50 8258: comment: %QDF: ignore_newline
7965: space: 8278: space: \x0a\x0a
7966: integer: 0 8280: integer: 50
7967: space: 8282: space:
7968: word: obj 8283: integer: 0
7971: space: \x0a 8284: space:
7972: integer: 44 8285: word: obj
7974: space: \x0a 8288: space: \x0a
7975: word: endobj 8289: integer: 318
7981: space: \x0a\x0a 8292: space: \x0a
7983: comment: %% Contents for page 8 8293: word: endobj
8005: space: \x0a 8299: space: \x0a\x0a
8006: comment: %% Original object ID: 44 0 8301: comment: %% Contents for page 8
8033: space: \x0a 8323: space: \x0a
8034: integer: 51 8324: comment: %% Original object ID: 44 0
8036: space: 8351: space: \x0a
8037: integer: 0 8352: integer: 51
8038: space: 8354: space:
8039: word: obj 8355: integer: 0
8042: space: \x0a 8356: space:
8043: dict_open: << 8357: word: obj
8045: space: \x0a 8360: space: \x0a
8048: name: /Length 8361: dict_open: <<
8055: space: 8363: space: \x0a
8056: integer: 52 8366: name: /Length
8058: space: 8373: space:
8059: integer: 0 8374: integer: 52
8060: space: 8376: space:
8061: word: R 8377: integer: 0
8062: space: \x0a 8378: space:
8063: dict_close: >> 8379: word: R
8065: space: \x0a 8380: space: \x0a
8066: word: stream 8381: dict_close: >>
8383: space: \x0a
8384: word: stream
skipping to endstream skipping to endstream
8117: word: endstream 8435: word: endstream
8126: space: \x0a 8444: space: \x0a
8127: word: endobj 8445: word: endobj
8133: space: \x0a\x0a 8451: space: \x0a\x0a
8135: integer: 52 8453: integer: 52
8137: space: 8455: space:
8138: integer: 0 8456: integer: 0
8139: space: 8457: space:
8140: word: obj 8458: word: obj
8143: space: \x0a 8461: space: \x0a
8144: integer: 44 8462: integer: 44
8146: space: \x0a 8464: space: \x0a
8147: word: endobj 8465: word: endobj
8153: space: \x0a\x0a 8471: space: \x0a\x0a
8155: comment: %% Contents for page 9 8473: comment: %% Contents for page 9
8177: space: \x0a 8495: space: \x0a
8178: comment: %% Original object ID: 45 0 8496: comment: %% Original object ID: 45 0
8205: space: \x0a
8206: integer: 53
8208: space:
8209: integer: 0
8210: space:
8211: word: obj
8214: space: \x0a
8215: dict_open: <<
8217: space: \x0a
8220: name: /Length
8227: space:
8228: integer: 54
8230: space:
8231: integer: 0
8232: space:
8233: word: R
8234: space: \x0a
8235: dict_close: >>
8237: space: \x0a
8238: word: stream
skipping to endstream
8289: word: endstream
8298: space: \x0a
8299: word: endobj
8305: space: \x0a\x0a
8307: integer: 54
8309: space:
8310: integer: 0
8311: space:
8312: word: obj
8315: space: \x0a
8316: integer: 44
8318: space: \x0a
8319: word: endobj
8325: space: \x0a\x0a
8327: comment: %% Contents for page 10
8350: space: \x0a
8351: comment: %% Original object ID: 46 0
8378: space: \x0a
8379: integer: 55
8381: space:
8382: integer: 0
8383: space:
8384: word: obj
8387: space: \x0a
8388: dict_open: <<
8390: space: \x0a
8393: name: /Length
8400: space:
8401: integer: 56
8403: space:
8404: integer: 0
8405: space:
8406: word: R
8407: space: \x0a
8408: dict_close: >>
8410: space: \x0a
8411: word: stream
skipping to endstream
8462: word: endstream
8471: space: \x0a
8472: word: endobj
8478: space: \x0a\x0a
8480: integer: 56
8482: space:
8483: integer: 0
8484: space:
8485: word: obj
8488: space: \x0a
8489: integer: 44
8491: space: \x0a
8492: word: endobj
8498: space: \x0a\x0a
8500: comment: %% Contents for page 11
8523: space: \x0a 8523: space: \x0a
8524: comment: %% Original object ID: 47 0 8524: integer: 53
8551: space: \x0a 8526: space:
8552: integer: 57 8527: integer: 0
8554: space: 8528: space:
8555: integer: 0 8529: word: obj
8556: space: 8532: space: \x0a
8557: word: obj 8533: dict_open: <<
8560: space: \x0a 8535: space: \x0a
8561: dict_open: << 8538: name: /Length
8563: space: \x0a 8545: space:
8566: name: /Length 8546: integer: 54
8573: space: 8548: space:
8574: integer: 58 8549: integer: 0
8576: space: 8550: space:
8577: integer: 0 8551: word: R
8578: space: 8552: space: \x0a
8579: word: R 8553: dict_close: >>
8580: space: \x0a 8555: space: \x0a
8581: dict_close: >> 8556: word: stream
8583: space: \x0a
8584: word: stream
skipping to endstream skipping to endstream
8635: word: endstream 8607: word: endstream
8644: space: \x0a 8616: space: \x0a
8645: word: endobj 8617: word: endobj
8651: space: \x0a\x0a 8623: space: \x0a\x0a
8653: integer: 58 8625: integer: 54
8655: space: 8627: space:
8656: integer: 0 8628: integer: 0
8657: space: 8629: space:
8658: word: obj 8630: word: obj
8661: space: \x0a 8633: space: \x0a
8662: integer: 44 8634: integer: 44
8664: space: \x0a 8636: space: \x0a
8665: word: endobj 8637: word: endobj
8671: space: \x0a\x0a 8643: space: \x0a\x0a
8673: integer: 59 8645: comment: %% Contents for page 10
8675: space: 8668: space: \x0a
8676: integer: 0 8669: comment: %% Original object ID: 46 0
8677: space: 8696: space: \x0a
8678: word: obj 8697: integer: 55
8681: space: \x0a 8699: space:
8682: dict_open: << 8700: integer: 0
8684: space: \x0a 8701: space:
8687: name: /Type 8702: word: obj
8692: space: 8705: space: \x0a
8693: name: /XRef 8706: dict_open: <<
8698: space: \x0a 8708: space: \x0a
8701: name: /Length 8711: name: /Length
8708: space: 8718: space:
8709: integer: 240 8719: integer: 56
8712: space: \x0a
8715: name: /W
8717: space:
8718: array_open: [
8719: space:
8720: integer: 1
8721: space: 8721: space:
8722: integer: 2 8722: integer: 0
8723: space: 8723: space:
8724: integer: 1 8724: word: R
8725: space: 8725: space: \x0a
8726: array_close: ] 8726: dict_close: >>
8727: space: \x0a 8728: space: \x0a
8730: name: /Root 8729: word: stream
8735: space:
8736: integer: 2
8737: space:
8738: integer: 0
8739: space:
8740: word: R
8741: space: \x0a
8744: name: /Size
8749: space:
8750: integer: 60
8752: space: \x0a
8755: name: /ID
8758: space:
8759: array_open: [
8760: string: \x88\x04\x8e\x17\xc9a\xe0\x94\xff\xec\xe9\x8c\xb8\x8cF\xd0 (raw: <88048e17c961e094ffece98cb88c46d0>)
8794: string: \xed\xd6\x0f\xe8\xee\x87\xf8\x871\xa8o\x81\x9f\xe6Q\x99 (raw: <edd60fe8ee87f88731a86f819fe65199>)
8828: array_close: ]
8829: space: \x0a
8830: dict_close: >>
8832: space: \x0a
8833: word: stream
skipping to endstream skipping to endstream
9081: word: endstream 8780: word: endstream
9090: space: \x0a 8789: space: \x0a
9091: word: endobj 8790: word: endobj
9097: space: \x0a\x0a 8796: space: \x0a\x0a
9099: word: startxref 8798: integer: 56
9108: space: \x0a 8800: space:
9109: integer: 8673 8801: integer: 0
9113: space: \x0a 8802: space:
9114: comment: %%EOF 8803: word: obj
9119: space: \x0a 8806: space: \x0a
9120: eof 8807: integer: 44
8809: space: \x0a
8810: word: endobj
8816: space: \x0a\x0a
8818: comment: %% Contents for page 11
8841: space: \x0a
8842: comment: %% Original object ID: 47 0
8869: space: \x0a
8870: integer: 57
8872: space:
8873: integer: 0
8874: space:
8875: word: obj
8878: space: \x0a
8879: dict_open: <<
8881: space: \x0a
8884: name: /Length
8891: space:
8892: integer: 58
8894: space:
8895: integer: 0
8896: space:
8897: word: R
8898: space: \x0a
8899: dict_close: >>
8901: space: \x0a
8902: word: stream
skipping to endstream
8953: word: endstream
8962: space: \x0a
8963: word: endobj
8969: space: \x0a\x0a
8971: integer: 58
8973: space:
8974: integer: 0
8975: space:
8976: word: obj
8979: space: \x0a
8980: integer: 44
8982: space: \x0a
8983: word: endobj
8989: space: \x0a\x0a
8991: integer: 59
8993: space:
8994: integer: 0
8995: space:
8996: word: obj
8999: space: \x0a
9000: dict_open: <<
9002: space: \x0a
9005: name: /Type
9010: space:
9011: name: /XRef
9016: space: \x0a
9019: name: /Length
9026: space:
9027: integer: 240
9030: space: \x0a
9033: name: /W
9035: space:
9036: array_open: [
9037: space:
9038: integer: 1
9039: space:
9040: integer: 2
9041: space:
9042: integer: 1
9043: space:
9044: array_close: ]
9045: space: \x0a
9048: name: /Root
9053: space:
9054: integer: 2
9055: space:
9056: integer: 0
9057: space:
9058: word: R
9059: space: \x0a
9062: name: /Size
9067: space:
9068: integer: 60
9070: space: \x0a
9073: name: /ID
9076: space:
9077: array_open: [
9078: string: \x88\x04\x8e\x17\xc9a\xe0\x94\xff\xec\xe9\x8c\xb8\x8cF\xd0 (raw: <88048e17c961e094ffece98cb88c46d0>)
9112: string: \xed\xd6\x0f\xe8\xee\x87\xf8\x871\xa8o\x81\x9f\xe6Q\x99 (raw: <edd60fe8ee87f88731a86f819fe65199>)
9146: array_close: ]
9147: space: \x0a
9148: dict_close: >>
9150: space: \x0a
9151: word: stream
skipping to endstream
9399: word: endstream
9408: space: \x0a
9409: word: endobj
9415: space: \x0a\x0a
9417: word: startxref
9426: space: \x0a
9427: integer: 8991
9431: space: \x0a
9432: comment: %%EOF
9437: space: \x0a
9438: eof
--- END FILE --- --- END FILE ---
--- BEGIN PAGE 1 --- --- BEGIN PAGE 1 ---
0: word: BT 0: word: BT
@ -595,9 +599,7 @@ skipping to endstream
103: dict_close: >> 103: dict_close: >>
105: space: \x0a 105: space: \x0a
106: word: ID 106: word: ID
skipping to EI 108: inline-image: x\x9c\xc5\xd6I\x0e\xc3 \x0c\x05P|\xffC;U\xc8`\xc0\xd37\x91Z\xa9\x0b\xa6\x17\x02\xc4\x98\xda\xe6\x8f\x1b}D\xf0\xef_\xb4\xf8\x1c\xc9W\xa9\x84\x9c\xc4-\x94\x88>\xff\x87\xc0\x8d>\x94^\x01&\xae\xa1u\xe2]\x80"!\x87\x95\x08\x96\x05*\xac&\x8fE|Sy\xae \xf0d-\x80<\x9d\x19B\x010B\x05\xfa@N\x11\xea+<\x1fhl\xe8K\xd0\xee/56L\xa0\x89\x90\xe3\x19\x1e \xa3\x96\xb9\xa6>0\x06>\x15Y\x81\xf9!c\xec\\x0eY\x0c\xd8\x0f%Y\xf0\x01\xa5\xd68?&\xa0\xd6\xeb\x88}j\x92\xfb\xe8\x1d;\xab\x8d3\x9d\xc2\xd6l\x14p\xdbsH\xf6\xfbt\xfa\x01Q\x02\xd8Tt*h\xccU\xfa\xe3w\x07\xcd\xd5\xd0%\xa8)p\x96\xb3"\x95DiRj\xb9\x96D\x18YNU\x11\xd3\xd9Av\x92F\xe0&\x0d\x90\xcd\xd4u#c\x95\xc6W\x09\xf4\xdf\x89\x03W\x93O\x0d\x0aEI\x0a
352: word: EI
354: space: \x0a
355: word: BT 355: word: BT
357: space: \x0a 357: space: \x0a
360: name: /F1 360: name: /F1
@ -743,13 +745,11 @@ skipping to EI
47: word: ET 47: word: ET
49: space: \x0a\x00\x0a 49: space: \x0a\x00\x0a
52: name: /ThisMustBeLast 52: name: /ThisMustBeLast
67: space: \x0a 67: eof
68: eof
--- END PAGE 5 --- --- END PAGE 5 ---
--- BEGIN PAGE 6 --- --- BEGIN PAGE 6 ---
0: word: ID 0: word: ID
skipping to EI EI not found; resuming normal scanning
EI not found
2: space: \x0a 2: space: \x0a
5: name: /F1 5: name: /F1
8: space: 8: space:
@ -772,27 +772,37 @@ EI not found
44: eof 44: eof
--- END PAGE 6 --- --- END PAGE 6 ---
--- BEGIN PAGE 7 --- --- BEGIN PAGE 7 ---
0: word: BT 0: name: /potato
2: space: \x0a 7: space: \x0a
5: name: /F1 8: word: BI
8: space: 10: space: \x0a
9: integer: 24 11: name: /CS
11: space: 14: space:
12: word: Tf 15: name: /G
14: space: \x0a 17: name: /W
17: integer: 72
19: space: 19: space:
20: integer: 720 20: integer: 66
23: space: 22: name: /H
24: word: Td 24: space:
26: space: \x0a 25: integer: 47
29: string: Potato (raw: (Potato)) 27: name: /BPC
37: space: 31: space:
38: word: Tj 32: integer: 8
40: space: \x0a 33: name: /F
41: word: ET 35: name: /Fl
43: space: \x0a 38: name: /DP
44: eof 41: dict_open: <<
43: name: /Predictor
53: space:
54: integer: 15
56: name: /Columns
64: space:
65: integer: 66
67: dict_close: >>
69: space: \x0a
70: word: ID
72: inline-image: x\x9c\xc5\xd6I\x0e\xc3 \x0c\x05P|\xffC;U\xc8`\xc0\xd37\x91Z\xa9\x0b\xa6\x17\x02\xc4\x98\xda\xe6\x8f\x1b}D\xf0\xef_\xb4\xf8\x1c\xc9W\xa9\x84\x9c\xc4-\x94\x88>\xff\x87\xc0\x8d>\x94^\x01&\xae\xa1u\xe2]\x80"!\x87\x95\x08\x96\x05*\xac&\x8fE|Sy\xae \xf0d-\x80<\x9d\x19B\x010B\x05\xfa@N\x11\xea+<\x1fhl\xe8K\xd0\xee/56L\xa0\x89\x90\xe3\x19\x1e \xa3\x96\xb9\xa6>0\x06>\x15Y\x81\xf9!c\xec\\x0eY\x0c\xd8\x0f%Y\xf0\x01\xa5\xd68?&\xa0\xd6\xeb\x88}j\x92\xfb\xe8\x1d;\xab\x8d3\x9d\xc2\xd6l\x14p\xdbsH\xf6\xfbt\xfa\x01Q\x02\xd8Tt*h\xccU\xfa\xe3w\x07\xcd\xd5\xd0%\xa8)p\x96\xb3"\x95DiRj\xb9\x96D\x18YNU\x11\xd3\xd9Av\x92F\xe0&\x0d\x90\xcd\xd4u#c\x95\xc6W\x09\xf4\xdf\x89\x03W\x93O\x0d\x0aEI
318: eof
--- END PAGE 7 --- --- END PAGE 7 ---
--- BEGIN PAGE 8 --- --- BEGIN PAGE 8 ---
0: word: BT 0: word: BT

Binary file not shown.

View File

@ -88,6 +88,8 @@ static char const* tokenTypeName(QPDFTokenizer::token_type_e ttype)
return "space"; return "space";
case QPDFTokenizer::tt_comment: case QPDFTokenizer::tt_comment:
return "comment"; return "comment";
case QPDFTokenizer::tt_inline_image:
return "inline-image";
} }
return 0; return 0;
} }
@ -131,7 +133,6 @@ dump_tokens(PointerHolder<InputSource> is, std::string const& label,
bool skip_streams, bool skip_inline_images) bool skip_streams, bool skip_inline_images)
{ {
Finder f1(is, "endstream"); Finder f1(is, "endstream");
Finder f2(is, "EI");
std::cout << "--- BEGIN " << label << " ---" << std::endl; std::cout << "--- BEGIN " << label << " ---" << std::endl;
bool done = false; bool done = false;
QPDFTokenizer tokenizer; QPDFTokenizer tokenizer;
@ -140,10 +141,20 @@ dump_tokens(PointerHolder<InputSource> is, std::string const& label,
{ {
tokenizer.includeIgnorable(); tokenizer.includeIgnorable();
} }
qpdf_offset_t inline_image_offset = 0;
while (! done) while (! done)
{ {
QPDFTokenizer::Token token = QPDFTokenizer::Token token =
tokenizer.readToken(is, "test", true, max_len); tokenizer.readToken(is, "test", true,
inline_image_offset ? 0 : max_len);
if (inline_image_offset && (token.getType() == QPDFTokenizer::tt_bad))
{
std::cout << "EI not found; resuming normal scanning" << std::endl;
is->seek(inline_image_offset, SEEK_SET);
inline_image_offset = 0;
continue;
}
inline_image_offset = 0;
qpdf_offset_t offset = is->getLastOffset(); qpdf_offset_t offset = is->getLastOffset();
std::cout << offset << ": " std::cout << offset << ": "
@ -170,7 +181,8 @@ dump_tokens(PointerHolder<InputSource> is, std::string const& label,
else if (skip_inline_images && else if (skip_inline_images &&
(token == QPDFTokenizer::Token(QPDFTokenizer::tt_word, "ID"))) (token == QPDFTokenizer::Token(QPDFTokenizer::tt_word, "ID")))
{ {
try_skipping(tokenizer, is, max_len, "EI", f2); tokenizer.expectInlineImage();
inline_image_offset = is->tell();
} }
else if (token.getType() == QPDFTokenizer::tt_eof) else if (token.getType() == QPDFTokenizer::tt_eof)
{ {