Error: A Name cannot be undefined
-
Hello, guys. I encountered with the following error after moving
data
folder with templates into docker mounted folder. I noticed that it happens only if I have attached templates in pdf utils. if I remove all attached sub-templates it works fine. Please help.Error: A Name cannot be undefined at new PDFName (/app/node_modules/jsreport-pdfjs/lib/object/name.js:6:13) at Function.parse (/app/node_modules/jsreport-pdfjs/lib/object/name.js:94:12) at Object.exports.parse (/app/node_modules/jsreport-pdfjs/lib/object/value.js:20:30) at Function.parse (/app/node_modules/jsreport-pdfjs/lib/object/dictionary.js:74:30) at Object.exports.parse (/app/node_modules/jsreport-pdfjs/lib/object/value.js:20:30) at Function.parse (/app/node_modules/jsreport-pdfjs/lib/object/object.js:68:28) at parseObject (/app/node_modules/jsreport-pdfjs/lib/object/reference.js:67:20) at PDFReference.get [as object] (/app/node_modules/jsreport-pdfjs/lib/object/reference.js:13:17) at Function.addObjectsRecursive (/app/node_modules/jsreport-pdfjs/lib/parser/parser.js:61:35) at Function.addObjectsRecursive (/app/node_modules/jsreport-pdfjs/lib/parser/parser.js:73:18)
-
FYI The error occurs during pdf generation
-
I tried pdf utils with a mounted folder to docker and it works fine for me.
Is this specific to a particular template? Are you able to replicate this with the some minimal template with pdf utils in fresh jsreport docker?
Could you tar/zip the data and upload it so we can try it?
What jsreport version do you use?
-
Hey guys, sorry for not responding long time, finally I got some time to work on it. So the latest update is that I encounter with this issue in Lambda when I call jsreport core to render a PDF for me. so it works fine without custom fonts added in template as assets, but I doesn't work with this:
<style>{#asset ../shared/graphik-font.css @encoding=utf8}</style> <style>{#asset ../shared/freightdisp-pro.css @encoding=utf8}</style>
though locally it works fine.
the fonts are located in shared folder and this is my font-face:@font-face { font-family: 'Graphik Web'; src: url({#asset fonts/Graphik-Regular-Web.woff2 @encoding=dataURI}) format('woff2'), url({#asset fonts/Graphik-Regular-Web.woff @encoding=dataURI}) format('woff'); font-weight: 400; font-style: normal; font-stretch: normal; } .Graphik-Regular-Web { font-family: 'Graphik Web'; font-weight: 400; font-style: normal; font-stretch: normal; }
-
So this is a lambda x font issue in the end?
Maybe it is the same as here, unfortunately, no solution we would be aware of so far.
https://forum.jsreport.net/category/2/general-forum