diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-06-30 15:21:56 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-07-06 13:34:37 +0200 |
commit | 255776a778b519183d6935ff0cb4b766644fa830 (patch) | |
tree | 16c2d411870b31cc25a2941d90ca862c10083667 /source/pdf/pdf-appearance.c | |
parent | b644ed1360d0e47c03a637bbc568000d57d0cdbf (diff) | |
download | mupdf-255776a778b519183d6935ff0cb4b766644fa830.tar.xz |
pdf: Drop generation number from public interfaces.
The generation number is only needed for decryption, and is assumed
to be zero or irrelevant for all other uses.
Store the original object number and generation in the xref slot, so
that we can decrypt them even when the objects have been renumbered,
without needing to pass the original object number around through
the stream loading APIs.
Diffstat (limited to 'source/pdf/pdf-appearance.c')
-rw-r--r-- | source/pdf/pdf-appearance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-appearance.c b/source/pdf/pdf-appearance.c index 8773ac05..029b131d 100644 --- a/source/pdf/pdf-appearance.c +++ b/source/pdf/pdf-appearance.c @@ -778,7 +778,7 @@ static int get_matrix(fz_context *ctx, pdf_document *doc, pdf_xobject *form, int pdf_lexbuf lbuf; fz_stream *str; - str = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->contents), pdf_to_gen(ctx, form->contents)); + str = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->contents)); pdf_lexbuf_init(ctx, &lbuf, PDF_LEXBUF_SMALL); @@ -1041,7 +1041,7 @@ static void update_marked_content(fz_context *ctx, pdf_document *doc, pdf_xobjec int first = 1; newbuf = fz_new_buffer(ctx, 0); - str_outer = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->contents), pdf_to_gen(ctx, form->contents)); + str_outer = pdf_open_stream(ctx, doc, pdf_to_num(ctx, form->contents)); len = fz_buffer_storage(ctx, fzbuf, &buf); str_inner = fz_open_memory(ctx, buf, len); |