Dear list, In one of my documents I have this lua block – \startluacode local metadata = lpdf.getmetadata(); ⋮ \stopluacode to modify some metadata fields. The file compiles with the latest LMTX (2021.10.28) without any errors but no PDF is produced. In the log, the following line is present : backend > blocked > function 'getmetadata' is not accessible I recall that this was working just fine some days back. Please advise. Thanks, kauśika
Dear list,
In one of my documents I have this lua block – \startluacode local metadata = lpdf.getmetadata(); ⋮ \stopluacode to modify some metadata fields.
The file compiles with the latest LMTX (2021.10.28) without any errors but no PDF is produced. In the log, the following line is present :
backend > blocked > function 'getmetadata' is not accessible
I recall that this was working just fine some days back.
Please advise.
On 10/30/2021 8:25 AM, kauśika cittūr via ntg-context wrote: that function was only meant for internal (inter-lua-module communication) usage (also because there are some expectations abotu what is in there) what do you want change? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Saturday, October 30, 2021 4:57:07 PM IST Hans Hagen wrote:
that function was only meant for internal (inter-lua-module communication) usage (also because there are some expectations abotu what is in there)
what do you want change?
Dear Hans, I want to (/used to) set the creator and producer in the following manner \startluacode local metadata = lpdf.getmetadata(); metadata['producer']='IKTS-VTR'; metadata['creator']='IKTS-VTR'; \stopluacode I was not able to do this using \setupinteraction, which I use to setup the title, subtitle and author. Thanks, kauśika
On 10/30/2021 2:29 PM, kauśika cittūr wrote:
On Saturday, October 30, 2021 4:57:07 PM IST Hans Hagen wrote:
that function was only meant for internal (inter-lua-module communication) usage (also because there are some expectations abotu what is in there)
what do you want change?
Dear Hans,
I want to (/used to) set the creator and producer in the following manner
\startluacode local metadata = lpdf.getmetadata(); metadata['producer']='IKTS-VTR'; metadata['creator']='IKTS-VTR'; \stopluacode
I was not able to do this using \setupinteraction, which I use to setup the title, subtitle and author. cf the pdf speca:
Creator: If the document was converted to PDF from another format, the name of the PDF processor that created the original document from which it was converted. Producer: If the document was converted to PDF from another format, the name of the PDF processor that converted it to PDF. so changing that is kind of cheating. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Saturday, October 30, 2021 9:16:15 PM IST Hans Hagen wrote:
cf the pdf speca:
Creator: If the document was converted to PDF from another format, the name of the PDF processor that created the original document from which it was converted.
Producer: If the document was converted to PDF from another format, the name of the PDF processor that converted it to PDF.
so changing that is kind of cheating.
Hans
Dear Hans, Thanks for the reference. Just to clarify, I only do this for VERY FEW documents I make, not all. In some cases, I need to keep the author of the document unidentifiable for purposes of security, since otherwise, people who know how to look for metadata can easily identify that I am the author given the small # of people using ConTeXt. In my department at university I am the only one using it as far as I know. The 'IKTS-VTR' values above are just an abbreviation for my lab/course. Anyway, since it is not good practice, I will try to make do without this. Thanks, kauśika
On 10/31/2021 5:35 AM, kauśika cittūr wrote:
On Saturday, October 30, 2021 9:16:15 PM IST Hans Hagen wrote:
cf the pdf speca:
Creator: If the document was converted to PDF from another format, the name of the PDF processor that created the original document from which it was converted.
Producer: If the document was converted to PDF from another format, the name of the PDF processor that converted it to PDF.
so changing that is kind of cheating.
Hans
Dear Hans,
Thanks for the reference. Just to clarify, I only do this for VERY FEW documents I make, not all.
In some cases, I need to keep the author of the document unidentifiable for purposes of security, since otherwise, people who know how to look for metadata can easily identify that I am the author given the small # of people using ConTeXt. In my department at university I am the only one using it as far as I know. The 'IKTS-VTR' values above are just an abbreviation for my lab/course.
I bet that clever students can trace that down -)
Anyway, since it is not good practice, I will try to make do without this. in that case you probably need to hide more .. (when you process with \nopdfcompression at the top you can look in the pdf, i.e. compression is not encryption
one thing you can do is make a copy of lpdf-xmp.lmt and wipe all tricky values and then use that to make a format but if security is important, maybe better is to use "qpdf" to encrypt the file (you can then also prevent editing for instance) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On Sunday, October 31, 2021 2:43:48 PM IST Hans Hagen wrote:
I bet that clever students can trace that down -)
Just to clarify, I am a student at university. Have to make some documents as a teaching assistant in courses so many students use the same abbreviations.
in that case you probably need to hide more .. (when you process with \nopdfcompression at the top you can look in the pdf, i.e. compression is not encryption
one thing you can do is make a copy of lpdf-xmp.lmt and wipe all tricky values and then use that to make a format
but if security is important, maybe better is to use "qpdf" to encrypt the file (you can then also prevent editing for instance)
I will try this out. Many thanks for your detailed response Hans! Best kauśika
On Sun, 31 Oct 2021, Hans Hagen via ntg-context wrote:
in that case you probably need to hide more .. (when you process with \nopdfcompression at the top you can look in the pdf, i.e. compression is not encryption
one thing you can do is make a copy of lpdf-xmp.lmt and wipe all tricky values and then use that to make a format
but if security is important, maybe better is to use "qpdf" to encrypt the file (you can then also prevent editing for instance)
qpdf is also good at stripping metadata: qpdf --empty --pages input.pdf -- output.pdf Aditya
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
kauśika cittūr