diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/tools/mudraw.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 8edcf381..75e32e5c 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -113,6 +113,10 @@ static int width = 0; static int height = 0; static int fit = 0; +static float layout_w = 450; +static float layout_h = 600; +static float layout_em = 12; + static int showfeatures = 0; static int showtime = 0; static size_t memtrace_current = 0; @@ -174,6 +178,10 @@ static void usage(void) "\t-f -\tfit width and/or height exactly; ignore original aspect ratio\n" "\t-B -\tmaximum bandheight (pgm, ppm, pam, png output only)\n" "\n" + "\t-W -\tpage width for EPUB layout\n" + "\t-H -\tpage height for EPUB layout\n" + "\t-S -\tfont size for EPUB layout\n" + "\n" "\t-c -\tcolorspace (mono, gray, grayalpha, rgb, rgba, cmyk, cmykalpha)\n" "\t-G -\tapply gamma correction\n" "\t-I\tinvert colors\n" @@ -848,7 +856,7 @@ int main(int argc, char **argv) fz_var(doc); - while ((c = fz_getopt(argc, argv, "po:F:R:r:w:h:fB:c:G:I:s:A:Di")) != -1) + while ((c = fz_getopt(argc, argv, "po:F:R:r:w:h:fB:c:G:I:s:A:DiW:H:S:")) != -1) { switch (c) { @@ -870,6 +878,10 @@ int main(int argc, char **argv) case 'G': gamma_value = atof(fz_optarg); break; case 'I': invert++; break; + case 'W': layout_w = atof(fz_optarg); break; + case 'H': layout_h = atof(fz_optarg); break; + case 'S': layout_em = atof(fz_optarg); break; + case 's': if (strchr(fz_optarg, 't')) ++showtime; if (strchr(fz_optarg, 'm')) ++showmemory; @@ -1060,6 +1072,8 @@ int main(int argc, char **argv) fz_throw(ctx, FZ_ERROR_GENERIC, "cannot authenticate password: %s", filename); } + fz_layout_document(ctx, doc, layout_w, layout_h, layout_em); + if (output_format == OUT_STEXT || output_format == OUT_TRACE) fz_printf(ctx, out, "<document name=\"%s\">\n", filename); |