ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Cannot access Lua function
@ 2021-10-30  6:25 kauśika cittūr via ntg-context
  2021-10-30 11:27 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: kauśika cittūr via ntg-context @ 2021-10-30  6:25 UTC (permalink / raw)
  To: ntg-context; +Cc: kauśika cittūr

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


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-30  6:25 Cannot access Lua function kauśika cittūr via ntg-context
@ 2021-10-30 11:27 ` Hans Hagen via ntg-context
  2021-10-30 12:29   ` kauśika cittūr via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2021-10-30 11:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On 10/30/2021 8:25 AM, kauśika cittūr via ntg-context wrote:
> 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.
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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-30 11:27 ` Hans Hagen via ntg-context
@ 2021-10-30 12:29   ` kauśika cittūr via ntg-context
  2021-10-30 15:46     ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: kauśika cittūr via ntg-context @ 2021-10-30 12:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen; +Cc: kauśika cittūr

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


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-30 12:29   ` kauśika cittūr via ntg-context
@ 2021-10-30 15:46     ` Hans Hagen via ntg-context
  2021-10-31  4:35       ` kauśika cittūr via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2021-10-30 15:46 UTC (permalink / raw)
  To: kauśika cittūr, mailing list for ConTeXt users; +Cc: Hans Hagen

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-30 15:46     ` Hans Hagen via ntg-context
@ 2021-10-31  4:35       ` kauśika cittūr via ntg-context
  2021-10-31  9:13         ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 8+ messages in thread
From: kauśika cittūr via ntg-context @ 2021-10-31  4:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen; +Cc: kauśika cittūr

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


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-31  4:35       ` kauśika cittūr via ntg-context
@ 2021-10-31  9:13         ` Hans Hagen via ntg-context
  2021-10-31 16:15           ` kauśika cittūr via ntg-context
  2021-11-02  5:18           ` Aditya Mahajan via ntg-context
  0 siblings, 2 replies; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2021-10-31  9:13 UTC (permalink / raw)
  To: kauśika cittūr, mailing list for ConTeXt users; +Cc: Hans Hagen

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-31  9:13         ` Hans Hagen via ntg-context
@ 2021-10-31 16:15           ` kauśika cittūr via ntg-context
  2021-11-02  5:18           ` Aditya Mahajan via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: kauśika cittūr via ntg-context @ 2021-10-31 16:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Hans Hagen; +Cc: kauśika cittūr

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


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cannot access Lua function
  2021-10-31  9:13         ` Hans Hagen via ntg-context
  2021-10-31 16:15           ` kauśika cittūr via ntg-context
@ 2021-11-02  5:18           ` Aditya Mahajan via ntg-context
  1 sibling, 0 replies; 8+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-11-02  5:18 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Aditya Mahajan

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-02  5:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-30  6:25 Cannot access Lua function kauśika cittūr via ntg-context
2021-10-30 11:27 ` Hans Hagen via ntg-context
2021-10-30 12:29   ` kauśika cittūr via ntg-context
2021-10-30 15:46     ` Hans Hagen via ntg-context
2021-10-31  4:35       ` kauśika cittūr via ntg-context
2021-10-31  9:13         ` Hans Hagen via ntg-context
2021-10-31 16:15           ` kauśika cittūr via ntg-context
2021-11-02  5:18           ` Aditya Mahajan via ntg-context

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).