summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/lpdf-wid.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-10-18 21:34:02 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-10-18 21:34:02 +0200
commit4a7fb336e5a59645520c05690efe98c9c7270d37 (patch)
treece8da19ee47ff43c5f44fc720c25e218d89a8ece /tex/context/base/mkiv/lpdf-wid.lua
parentf34b1249e3ad9bcbe34323c6daf0ad3174190649 (diff)
downloadcontext-4a7fb336e5a59645520c05690efe98c9c7270d37.tar.gz
2017-10-18 21:22:00
Diffstat (limited to 'tex/context/base/mkiv/lpdf-wid.lua')
-rw-r--r--tex/context/base/mkiv/lpdf-wid.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua
index 64cf1c3dc..c2cd3bae1 100644
--- a/tex/context/base/mkiv/lpdf-wid.lua
+++ b/tex/context/base/mkiv/lpdf-wid.lua
@@ -6,6 +6,24 @@ if not modules then modules = { } end modules ['lpdf-wid'] = {
license = "see context related readme files"
}
+-- It's about time to give up on media in pdf and admit that pdf lost it to html.
+-- First we had movies and sound, quite easy to deal with, but obsolete now. Then we
+-- had renditions but they turned out to be unreliable from the start and look
+-- obsolete too or at least they are bound to the (obsolete) flash technology for
+-- rendering. They were already complex constructs. Now we have rich media which
+-- instead of providing a robust future proof framework fo rgeneral media types
+-- again seems to depend on viewers built in (yes, also kind of obsolete) flash
+-- technology, and we cannot expect this non-open technology to show up in open
+-- browsers. So, in the end we can best just use links to external resources to be
+-- future proof. Just look at the viewer prferences pane to see how fragile support
+-- is. Interestingly u3d support is kind of built in, while e.g. mp4 support relies
+-- on wrapping in swf. We used to stay ahead of the pack with support of the fancy
+-- pdf features but it backfires and is not worth the trouble. And yes, for control
+-- (even simple like starting and stopping videos) one has to revert to JavaScript,
+-- the other fragile bit. And, now that adobe quits flash in 2020 we're without any
+-- video anyway. Also, it won't play on all platforms and devices so let's wait for
+-- html5 media in pdf then.
+
local tonumber = tonumber
local gmatch, gsub, find, lower, format = string.gmatch, string.gsub, string.find, string.lower, string.format
local stripstring = string.strip
@@ -290,7 +308,8 @@ function codeinjections.embedfile(specification)
local d = pdfdictionary {
Type = pdfconstant("Filespec"),
F = pdfstring(savename),
- UF = pdfstring(savename),
+ -- UF = pdfstring(savename),
+ UF = pdfunicode(savename),
EF = pdfdictionary { F = pdfreference(f) },
Desc = title ~= "" and pdfunicode(title) or nil,
-- AFRelationship = pdfconstant("Source"), -- some day maybe, not mandate