diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-page.c | 6 | ||||
-rw-r--r-- | source/tools/mudraw.c | 2 | ||||
-rw-r--r-- | source/tools/pdfcreate.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/pdf/pdf-page.c b/source/pdf/pdf-page.c index 30cbb4e9..281b146c 100644 --- a/source/pdf/pdf-page.c +++ b/source/pdf/pdf-page.c @@ -697,7 +697,7 @@ pdf_delete_page_range(fz_context *ctx, pdf_document *doc, int start, int end) } pdf_page * -pdf_create_page(fz_context *ctx, pdf_document *doc, fz_rect mediabox, fz_buffer *buffer, int rotate) +pdf_create_page(fz_context *ctx, pdf_document *doc, fz_rect mediabox, int rotate, fz_buffer *contents) { pdf_page *page = NULL; pdf_obj *pageobj, *obj; @@ -738,11 +738,11 @@ pdf_create_page(fz_context *ctx, pdf_document *doc, fz_rect mediabox, fz_buffer fz_concat(&ctm, &ctm, &tmp); page->ctm = ctm; - if (buffer != NULL) + if (contents != NULL) { obj = pdf_new_dict(ctx, doc, 4); page->contents = pdf_new_ref(ctx, doc, obj); - pdf_update_stream(ctx, doc, page->contents, buffer, 0); + pdf_update_stream(ctx, doc, page->contents, contents, 0); pdf_drop_obj(ctx, obj); obj = NULL; pdf_dict_puts(ctx, pageobj, "Contents", page->contents); diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index fb253da4..aecc6368 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -387,7 +387,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) tbounds = bounds; fz_transform_rect(&tbounds, &ctm); - newpage = pdf_create_page(ctx, pdfout, bounds, NULL, 0); + newpage = pdf_create_page(ctx, pdfout, bounds, 0, NULL); fz_try(ctx) { diff --git a/source/tools/pdfcreate.c b/source/tools/pdfcreate.c index 4e4a622e..6317e304 100644 --- a/source/tools/pdfcreate.c +++ b/source/tools/pdfcreate.c @@ -403,7 +403,7 @@ static int create_pdf(fz_context *ctx, char *output, resources fonts[], int num_ length = get_page_contents(ctx, k, &content, buffer); fz_buf = fz_new_buffer_from_data(ctx, buffer, length); buffer = NULL; - newpage = pdf_create_page(ctx, pdf, bounds, fz_buf, 0); + newpage = pdf_create_page(ctx, pdf, bounds, 0, fz_buf); /* Create the dicts for the page resources */ font_dict = create_page_res_dict(ctx, pdf, content.ref_font_resources[k], "Font", content.num_page_font_res[k]); @@ -424,7 +424,7 @@ static int create_pdf(fz_context *ctx, char *output, resources fonts[], int num_ } else { - newpage = pdf_create_page(ctx, pdf, bounds, NULL, 0); + newpage = pdf_create_page(ctx, pdf, bounds, 0, NULL); } pdf_insert_page(ctx, pdf, newpage, INT_MAX); pdf_drop_page(ctx, newpage); |