
On 6/4/25 19:34, Hans Hagen via ntg-context wrote:
[...] You can move:
local function urls(url) ... end
to before:
local function includeprofile(s)
to get rid of the error. Many thanks for your reply, Hans.
This fixes the issue for me. Jan-Urlich, could you test it yourself? Just in case it might help you, I include a patch below. Many thanks for your help, Pablo Patch: --- lpdf-fmt.lmt 2025-06-05 18:35:30.016927969 +0200 +++ mkxl/lpdf-fmt.lmt 2025-06-05 18:36:27.670594638 +0200 @@ -260,6 +260,23 @@ return lower(file.basename(filename)) end +local function urls(url) + if not url or url == "" then + return nil + else + local u = pdfarray() + for url in gmatch(url,"([^, ]+)") do + if find(url,"^http") then + u[#u+1] = pdfdictionary { + FS = pdfconstant("URL"), + F = pdfstring(url), + } + end + end + return u + end +end + local function includeprofile(s) local filename = s.filename or "" local colorspace = s.colorspace or "" @@ -313,23 +330,6 @@ return defaultprofiles[channel] end -local function urls(url) - if not url or url == "" then - return nil - else - local u = pdfarray() - for url in gmatch(url,"([^, ]+)") do - if find(url,"^http") then - u[#u+1] = pdfdictionary { - FS = pdfconstant("URL"), - F = pdfstring(url), - } - end - end - return u - end -end - local function processprofile(s,spec) -- specification local filename = s.filename or "" local colorspace = lower(s.colorspace or "")