On 10/30/26 11:31, Pablo Rodriguez via ntg-context wrote:
> […]
> External `/ModDate` is read, but I don’t know how to write it to the
> currrent document.
> 
> What am I missing here?

I’m afraid that both “Evince” and “Papers” (but not “Okular”) read the
modification date from the XMP file.

The following works even with these viewers, but because
`lpdf.replacexmpinfo` deletes but does not write `<ModifyDate>` in the
XMP file:

  \startluacode
    d, pdfstring, pdfaddtoinfo, pdfaddxmpinfo, pdfreplacexmpinfo =
        document, lpdf.string, lpdf.addtoinfo, lpdf.addxmpinfo,
        lpdf.replacexmpinfo
    d.c_date = "D:20210724232420+02’00’"
    d.xmpdate = "2022-12-00T01:28:41+01:00"
    pdfaddtoinfo("ModDate", pdfstring(d.c_date), d.c_date)
    --pdfaddxmpinfo("ModifyDate",d.xmpdate)
    pdfreplacexmpinfo("ModifyDate",d.xmpdate)
  \stopluacode
  \cldcontext{pdfstring(d.c_date)}\\
  \cldcontext{d.xmpdate}\\
  \stoptext

Is that behavior of `lpdf.replacexmpinfo` really intended?

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