From c87adf950ad83fc9737cf22d91943e0fc21352fd Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 16 Jun 2017 11:47:38 +0100 Subject: Windows MuPDF viewer; add ability to start on a given page. Same mechanism as the x11 version: mupdf.exe in.pdf 10 --- platform/x11/win_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index 860c6dbc..67efdb9d 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -1280,7 +1280,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow if (fz_optind < argc) { - strcpy(filename, argv[fz_optind]); + strcpy(filename, argv[fz_optind++]); } else { @@ -1291,6 +1291,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow winerror(&gapp, "cannot convert filename to utf-8"); } + if (fz_optind < argc) + gapp.pageno = atoi(argv[fz_optind++]); + if (bps) pdfapp_open_progressive(&gapp, filename, 0, bps); else -- cgit v1.2.3