RangeError:当数据为100k时,jsreport中的字符串长度无效

时间:2018-09-18 05:04:40

标签: javascript node.js jsreport

过去2天,我正在尝试在Node.js环境中使用jsreport生成PDF。 对于小尺寸数据,它工作正常。但不幸的是,当数据大约为10万时,它不起作用。它显示

Unhandled rejection /data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:1495
data: bin/www:16035 - result += newView._.onRender ? newView._.onRender(itemResult, childView) : itemResult;
data: bin/www:16035 - ^
data: bin/www:16035 - RangeError: Invalid string length
data: bin/www:16035 - at renderWithViews (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:1495:79)
data: bin/www:16035 - at Object.renderContent [as render] (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:1363:13)
data: bin/www:16035 - at Tag.render (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:2324:24)
data: bin/www:16035 - at renderTag (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:655:26)
data: bin/www:16035 - at Object.eval [as fn] (eval at buildCode (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:2156:10), <anonymous>:33:2)
data: bin/www:16035 - at renderWithViews (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:1508:18)
data: bin/www:16035 - at Object.renderContent [as render] (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:1363:13)
data: bin/www:16035 - at Tag.render (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:2305:15)
data: bin/www:16035 - at renderTag (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:655:26)
data: bin/www:16035 - at Object.eval [as fn] (eval at buildCode (/data/bizsystem/service-report/node_modules/jsrender/jsrender-node.js:2156:10), <anonymous>:7:2)

任何帮助将不胜感激。

0 个答案:

没有答案