From adc06f3c7f4ca0acbee8b5be84d72d716b60b5a0 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 16 Jun 2016 12:23:11 +0200 Subject: Add PNG output for mutool convert. --- source/pdf/pdf-write.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/pdf') diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c index b160002e..b6e37d39 100644 --- a/source/pdf/pdf-write.c +++ b/source/pdf/pdf-write.c @@ -2766,7 +2766,7 @@ const char *fz_pdf_write_options_usage = "\tgarbage: garbage collect unused objects\n" "\tor garbage=compact: ... and compact cross reference table\n" "\tor garbage=deduplicate: ... and remove duplicate objects\n" - ; + "\n"; pdf_write_options * pdf_parse_write_options(fz_context *ctx, pdf_write_options *opts, const char *args) @@ -3264,7 +3264,8 @@ fz_new_pdf_writer(fz_context *ctx, const char *path, const char *options) fz_try(ctx) { - wri->filename = fz_strdup(ctx, path); + pdf_parse_write_options(ctx, &wri->opts, options); + wri->filename = fz_strdup(ctx, path ? path : "out.pdf"); wri->pdf = pdf_create_document(ctx); } fz_catch(ctx) @@ -3275,7 +3276,5 @@ fz_new_pdf_writer(fz_context *ctx, const char *path, const char *options) fz_rethrow(ctx); } - pdf_parse_write_options(ctx, &wri->opts, options); - return (fz_document_writer*)wri; } -- cgit v1.2.3