summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2023-01-17 22:11:05 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2023-01-17 22:11:05 +0000
commit6214af86f59e8b8fb1734c1dc47a98d916b75cf3 (patch)
tree50cb103fbf5d8930b9155b2cd7657c9f132490df /Build/source/texk/web2c/luatexdir/lua
parentf8b1993f28ed85af42a3809ff0fd179f19ffb777 (diff)
Sync with upstream luatex 43f4f57e5
git-svn-id: svn://tug.org/texlive/trunk@65574 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lpdflib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
index 057af5ea6f3..70fbde76bb9 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
+++ b/Build/source/texk/web2c/luatexdir/lua/lpdflib.c
@@ -820,6 +820,12 @@ static int getpdfomitinfodict(lua_State * L)
return 1 ;
}
+static int getpdfomitmediabox(lua_State * L)
+{
+ lua_pushinteger(L, (pdf_omit_mediabox));
+ return 1 ;
+}
+
static int setpdfgentounicode(lua_State * L)
{
if (lua_type(L, 1) == LUA_TNUMBER) {
@@ -852,6 +858,14 @@ static int setpdfomitinfodict(lua_State * L)
return 0 ;
}
+static int setpdfomitmediabox(lua_State * L)
+{
+ if (lua_type(L, 1) == LUA_TNUMBER) {
+ set_pdf_omit_mediabox(lua_tointeger(L, 1));
+ }
+ return 0 ;
+}
+
/* for tracing purposes when no pages are flushed */
static int setforcefile(lua_State * L)
@@ -1365,12 +1379,14 @@ static const struct luaL_Reg pdflib[] = {
{ "getomitcidset", getpdfomitcidset },
{ "getomitcharset", getpdfomitcharset },
{ "getomitinfo", getpdfomitinfodict },
+ { "getomitmediabox", getpdfomitmediabox },
{ "setinclusionerrorlevel", setpdfinclusionerrorlevel },
{ "setignoreunknownimages", setpdfignoreunknownimages },
{ "setgentounicode", setpdfgentounicode },
{ "setomitcidset", setpdfomitcidset },
{ "setomitcharset", setpdfomitcharset },
{ "setomitinfo", setpdfomitinfodict },
+ { "setomitmediabox", setpdfomitmediabox },
{ "setforcefile", setforcefile },
{ "mapfile", l_mapfile },
{ "mapline", l_mapline },