From c49d2942bae7074f3bd4c04b6ee895cee1697ca3 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 29 Apr 2019 09:43:01 +0200 Subject: 2019-04-29 09:01:00 --- tex/context/base/mkiv/lpdf-mis.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tex/context/base/mkiv/lpdf-mis.lua') diff --git a/tex/context/base/mkiv/lpdf-mis.lua b/tex/context/base/mkiv/lpdf-mis.lua index 77f11918b..0f51ea4f6 100644 --- a/tex/context/base/mkiv/lpdf-mis.lua +++ b/tex/context/base/mkiv/lpdf-mis.lua @@ -76,6 +76,7 @@ local v_layer = variables.layer local v_lefttoright = variables.lefttoright local v_righttoleft = variables.righttoleft local v_title = variables.title +local v_nomenubar = variables.nomenubar local positive = register(pageliteral("/GSpositive gs")) local negative = register(pageliteral("/GSnegative gs")) @@ -329,6 +330,9 @@ local plusspecs = { [v_righttoleft] ={ direction = "R2R", }, + [v_nomenubar] ={ + nomenubar = true, + }, } local pagespecs = { @@ -393,6 +397,11 @@ local pagespecs = { duplex = "Simplex", paper = true, }, + [v_nomenubar] = { + mode = "UseNone", + layout = "auto", + nomenubar = true, + }, } local pagespec, topoffset, leftoffset, height, width, doublesided = "default", 0, 0, 0, 0, false @@ -472,6 +481,7 @@ local function documentspecification() local paper = spec.paper local title = spec.title local direction = spec.direction + local nomenubar = spec.nomenubar if layout then addtocatalog("PageLayout",pdfconstant(layout)) end @@ -490,7 +500,7 @@ local function documentspecification() prints = pdfarray(flattened(pages.toranges(marked))) end end - if fit or fixed or duplex or copies or paper or prints or title or direction then + if fit or fixed or duplex or copies or paper or prints or title or direction or nomenubar then addtocatalog("ViewerPreferences",pdfdictionary { FitWindow = fit and true or nil, PrintScaling = fixed and pdfconstant("None") or nil, @@ -500,6 +510,7 @@ local function documentspecification() PrintPageRange = prints or nil, DisplayDocTitle = title and true or nil, Direction = direction and pdfconstant(direction) or nil, + HideMenubar = nomenubar and true or nil, }) end addtoinfo ("Trapped", pdfconstant("False")) -- '/Trapped' in /Info, 'Trapped' in XMP -- cgit v1.2.3