summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lpdf-wid.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-02-17 16:17:51 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-02-17 16:17:51 +0100
commit631a40d69d7fb4e5beff90039d21da5472dd1020 (patch)
tree8e9d9dc68c506fe309ccef784fe4b59853e98add /tex/context/base/mkiv/lpdf-wid.lua
parent8e11d447440b44990432ac838953a8cde4ef914f (diff)
downloadcontext-631a40d69d7fb4e5beff90039d21da5472dd1020.tar.gz
2020-02-17 12:10:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-wid.lua')
-rw-r--r--tex/context/base/mkiv/lpdf-wid.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua
index 8e0a45a00..106eb98cc 100644
--- a/tex/context/base/mkiv/lpdf-wid.lua
+++ b/tex/context/base/mkiv/lpdf-wid.lua
@@ -347,13 +347,12 @@ function codeinjections.embedfile(specification)
f = pdfflushstreamobject(data,a)
specification.data = true -- signal that still data but already flushed
else
+ local attributes = lfs.attributes(foundname)
local modification = modificationtime(foundname)
- if attributes then
- a.Params = {
- Size = attributes.size,
- ModDate = lpdf.pdftimestamp(modification),
- }
- end
+ a.Params = {
+ Size = attributes.size,
+ ModDate = lpdf.pdftimestamp(modification),
+ }
f = pdfflushstreamfileobject(foundname,a,compress)
end
local d = pdfdictionary {
@@ -449,7 +448,7 @@ function nodeinjections.attachfile(specification)
AP = appearance,
OC = analyzelayer(specification.layer),
-- F = pdfnull(), -- another rediculous need to satisfy validation
- F = (flags | 4) & (1023-1-2-32-256), -- set 3, clear 1,2,6,9; PDF 32000-1, p385
+ F = bit32.band(bit32.bor(flags,4),(1023-1-2-32-256)), -- set 3, clear 1,2,6,9; PDF 32000-1, p385
}
local width = specification.width or 0
local height = specification.height or 0