ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setmemstream to use pdfe.new instead of epdf.openMemStream
@ 2018-06-23 21:55 Adam Reviczky
  2018-06-24  9:05 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Reviczky @ 2018-06-23 21:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

I am using the "figures.setmemstream" for inline images and it is
broken now with the latest luatex on the changes from
epdf.openMemStream to pdfe.new.

Although it does say "very experimental and likely to change", but can
we update the call from epdf.openMemStream?

Minimal example:
\starttext
\startluacode
figures.setmemstream("inline",mime.unb64("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII="))
context.externalfigure({"memstream:///inline"})
\stopluacode
\stoptext

or as in grph-mem.lua:
-- \startluacode
--     figures.setmemstream("whatever",io.loaddata("t:/sources/cow.pdf"))
-- \stopluacode
--
-- \externalfigure[memstream:///t:/sources/cow.pdf]
-- \externalfigure[memstream:///whatever]

The error message is:
/usr/share/texmf/tex/context/base/mkiv/grph-mem.lua:32: attempt to
index global 'epdf' (a nil value)
stack traceback:
    /usr/share/texmf/tex/context/base/mkiv/grph-mem.lua:32: in
function 'setmemstream'
    [ctxlua]:2: in main chunk

Which points to the line of "local memstream, identifier =
epdf.openMemStream(stream,#stream,name)"
LuaTeX commit 6822 change was "epdf.new (aka memstreams) (HH)"

ConTeXt  ver: 2018.06.23 12:12 MKIV beta  fmt: 2018.6.23  int: english/english
luatex version 1.09 with functionality level 6823,

Thanks,
Adam
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-24  9:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-23 21:55 setmemstream to use pdfe.new instead of epdf.openMemStream Adam Reviczky
2018-06-24  9:05 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).