Dear list,

this minimal sample tries to set dates in current document from another
document’s `/ModDate`:

  \startluacode
  function document.transfer_metadata(name)
    local main_doc = pdfe.open(name)
    local mdoc_date = main_doc.Info.ModDate
    if mdoc_date ~=nil and mdoc_date ~= "" then
      -- directives.enable("backend.date", mdoc_date)
      context(mdoc_date)
    end
    pdfe.close(name)
  end
  \stopluacode
  \starttext
  \ctxlua{document.transfer_metadata("xml-mkiv.pdf")}
  \stoptext

External `/ModDate` is read, but I don’t know how to write it to the
currrent document.

What am I missing here?

Many thanks for your help,

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

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to