Hi Hans, the attached patch replaces "#" with "^" as autoprefix for named destinations in lpdf.ano (both for MkXL and MkIV).
This would allow urls such as https://pdf.ousia.tk/autoprefix.pdf#nameddest=^33 ("#" is a reserved char in urls). Also “PDF Open Parameters” reserves the usage of "#", "&", "=" and these special characters cannot be escaped (https://pdfobject.com/pdf/pdf_open_parameters_acro8.pdf#search=escape). I hope it helps, Pablo
diff -ru lpdf-ano/lpdf-ano.lmt lpdf-new/lpdf-ano.lmt --- lpdf-ano/lpdf-ano.lmt 2022-10-16 12:39:37.528259000 +0200 +++ lpdf-new/lpdf-ano.lmt 2022-10-16 12:40:56.671001048 +0200 @@ -109,7 +109,7 @@ local pdf_fit = pdfconstant("Fit") local pdf_named = pdfconstant("Named") -local autoprefix = "#" +local autoprefix = "^" local usedautoprefixes = { } local function registerautoprefix(name) diff -ru lpdf-ano/lpdf-ano.lua lpdf-new/lpdf-ano.lua --- lpdf-ano/lpdf-ano.lua 2022-10-16 12:39:43.960319000 +0200 +++ lpdf-new/lpdf-ano.lua 2022-10-16 12:42:52.600087339 +0200 @@ -105,7 +105,7 @@ local pdf_fit = pdfconstant("Fit") local pdf_named = pdfconstant("Named") -local autoprefix = "#" +local autoprefix = "^" local usedautoprefixes = { } local function registerautoprefix(name)
_______________________________________________ dev-context mailing list dev-context@ntg.nl https://mailman.ntg.nl/mailman/listinfo/dev-context