summaryrefslogtreecommitdiff
path: root/include/mupdf/pdf/xref.h
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2015-03-08 18:31:22 +0100
committerRobin Watts <robin.watts@artifex.com>2015-03-20 17:14:07 +0000
commitcef4820268f18f03c4407d3897abfde012e92204 (patch)
tree1d51dfd1a38a66a7dc4bc2e34e5fc5796c62734b /include/mupdf/pdf/xref.h
parent6c9dc1493cdf4ff11bc8f8f9fc0e26ee328fbaef (diff)
downloadmupdf-cef4820268f18f03c4407d3897abfde012e92204.tar.xz
Automatically update /Length and /Filter in pdf_update_stream.
Diffstat (limited to 'include/mupdf/pdf/xref.h')
-rw-r--r--include/mupdf/pdf/xref.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/mupdf/pdf/xref.h b/include/mupdf/pdf/xref.h
index c41b0291..aa54605f 100644
--- a/include/mupdf/pdf/xref.h
+++ b/include/mupdf/pdf/xref.h
@@ -19,12 +19,11 @@ void pdf_update_object(fz_context *ctx, pdf_document *doc, int num, pdf_obj *obj
/*
pdf_update_stream: Replace stream contents for object in xref table with the passed in buffer.
- The buffer contents must match the /Filter setting.
- If storing uncompressed data, make sure to delete the /Filter key from
- the stream dictionary. If storing deflated data, make sure to set the
- /Filter value to /FlateDecode.
+ The buffer contents must match the /Filter setting if 'compressed' is true.
+ If 'compressed' is false, the /Filter and /DecodeParms entries are deleted.
+ The /Length entry is updated.
*/
-void pdf_update_stream(fz_context *ctx, pdf_document *doc, int num, fz_buffer *buf);
+void pdf_update_stream(fz_context *ctx, pdf_document *doc, pdf_obj *ref, fz_buffer *buf, int compressed);
/*
* xref and object / stream api