From e0c0500042bf90193c5deb196dafa5cdb64ec0dc Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 20 Mar 2018 16:10:11 +0100 Subject: Add pdf_add_new_dict family of functions. Create a new empty dictionary, add it to the xref and return a new indirect reference object that points to it. This indirect reference needs to be dropped, since it was created with a function using the 'new' keyword. --- include/mupdf/pdf/xref.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/mupdf/pdf/xref.h b/include/mupdf/pdf/xref.h index 87a84efe..1924b635 100644 --- a/include/mupdf/pdf/xref.h +++ b/include/mupdf/pdf/xref.h @@ -29,6 +29,9 @@ pdf_obj *pdf_add_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj); pdf_obj *pdf_add_object_drop(fz_context *ctx, pdf_document *doc, pdf_obj *obj); pdf_obj *pdf_add_stream(fz_context *ctx, pdf_document *doc, fz_buffer *buf, pdf_obj *obj, int compressed); +pdf_obj *pdf_add_new_dict(fz_context *ctx, pdf_document *doc, int initial); +pdf_obj *pdf_add_new_array(fz_context *ctx, pdf_document *doc, int initial); + /* * xref and object / stream api */ -- cgit v1.2.3