Hello,

I am a ConTeXt user with no deep knowledge of the internals, so please forgive me if I am missing something obvious. While working on PDF/X-4 output with a gray ICC profile, I noticed that the color profile registered in colorprofiles.lua was never found by ConTeXt, even after regenerating the file database. With the help of an AI assistant that inspected the source code, we traced the issue to line 722 of lpdf-fmt.lua:

lualocal luadata = loadfile(filename)
luadata = ludata and luadata()   -- 'ludata' is undefined here

It appears that ludata on line 722 should be luadata, matching the local variable defined on line 721. As written, ludata is nil, so luadata is immediately overwritten with nil and the Lua profile file is silently discarded. The XML fallback works correctly, which is why the issue is not immediately visible. I may be wrong, but it looks like a simple typo. The workaround we found was to register the profile in colorprofiles.xml instead, where it is found correctly. Thank you for all the work you and the team put into ConTeXt. It is greatly appreciated.

Best regards,
Eduardo Bohoyo

___________________________________________________________________________________
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