ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Adam Reviczky <reviczky@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: setmemstream to use pdfe.new instead of epdf.openMemStream
Date: Sat, 23 Jun 2018 22:55:21 +0100	[thread overview]
Message-ID: <CABaoHusjBkkJNmmk8+Kf0Qu2W0Gp+S6=XJ3swGeuEr3i5GE9Jw@mail.gmail.com> (raw)

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
___________________________________________________________________________________

             reply	other threads:[~2018-06-23 21:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-23 21:55 Adam Reviczky [this message]
2018-06-24  9:05 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABaoHusjBkkJNmmk8+Kf0Qu2W0Gp+S6=XJ3swGeuEr3i5GE9Jw@mail.gmail.com' \
    --to=reviczky@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).