diff options
Diffstat (limited to 'platform/x11/win_main.c')
-rw-r--r-- | platform/x11/win_main.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index b6a5ae6a..e004380d 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -1214,6 +1214,7 @@ static void usage(void) fprintf(stderr, "\t-H -\tpage height for EPUB layout\n"); fprintf(stderr, "\t-S -\tfont size for EPUB layout\n"); fprintf(stderr, "\t-U -\tuser style sheet for EPUB layout\n"); + fprintf(stderr, "\t-X\tdisable document styles for EPUB layout\n"); exit(1); } @@ -1230,7 +1231,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow int bps = 0; int displayRes = get_system_dpi(); int c; - char *layout_css = NULL; ctx = fz_new_context(NULL, NULL, FZ_STORE_DEFAULT); if (!ctx) @@ -1242,7 +1242,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow argv = fz_argv_from_wargv(argc, wargv); - while ((c = fz_getopt(argc, argv, "p:r:A:C:W:H:S:U:b:")) != -1) + while ((c = fz_getopt(argc, argv, "p:r:A:C:W:H:S:U:Xb:")) != -1) { switch (c) { @@ -1260,7 +1260,8 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow case 'H': gapp.layout_h = fz_atoi(fz_optarg); break; case 'S': gapp.layout_em = fz_atoi(fz_optarg); break; case 'b': bps = (fz_optarg && *fz_optarg) ? fz_atoi(fz_optarg) : 4096; break; - case 'U': layout_css = fz_optarg; break; + case 'U': gapp.layout_css = fz_optarg; break; + case 'X': gapp.layout_use_doc_css = 0; break; default: usage(); } } @@ -1285,13 +1286,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow winerror(&gapp, "cannot convert filename to utf-8"); } - if (layout_css) - { - fz_buffer *buf = fz_read_file(ctx, layout_css); - fz_set_user_css(ctx, fz_string_from_buffer(ctx, buf)); - fz_drop_buffer(ctx, buf); - } - if (bps) pdfapp_open_progressive(&gapp, filename, 0, bps); else |