1

After visiting this question this question

I was wondering where I could find all the fields, to be able to edit the pdf metadata generated with ConTeXt

1 Answer 1

1

You can simply inspect the return value of lpdf.getmetadata to explore all the defined fields.

\starttext
\startluacode
local metadata = lpdf.getmetadata()
inspect(metadata)
\stopluacode
\stoptext

This will leave the following in the log file

table={
 ["contextversion"]="2021.03.05 19:11",
 ["creator"]="LuaTeX 1.13 7430 + ConTeXt MkIV 2021.03.05 19:11",
 ["luatexfunctionality"]="7430",
 ["luatexversion"]="1.13",
 ["luaversion"]="5.3",
 ["platform"]="linux-64",
 ["producer"]="LuaTeX-1.13",
 ["time"]="2021-05-25T20:10:31+02:00",
}

To set the title and author metadata it is better to use

\setupinteraction[state=start]
\startdocument
  [metadata:title={Title},
   metadata:subtitle={Subtitle},
   metadata:author={Author},
   metadata:date={Date}]

  ...

\stopdocument

instead of \start...\stoptext, because this will also update the XMP data in case you are creating tagged PDF.

3
  • Thank you I can get the meetadata, but I can't "overwrite" them. If I copy and paste your code and compiling the generated PDF, looking with Adobe Acobat, it doesn't change anything.
    – user242592
    May 25, 2021 at 19:03
  • @Zezzo Which code? Note that for the \startdocument bit you also need \setupinteraction[state=start]. I'll add that to the answer. May 25, 2021 at 19:23
  • Okay, I undestand, but actuallu I can't really understand how to put those string of text in code
    – user242592
    May 25, 2021 at 20:27

You must log in to answer this question.