Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred when then html is "too big" #49

Open
thermech opened this issue May 31, 2016 · 3 comments
Open

Error occurred when then html is "too big" #49

thermech opened this issue May 31, 2016 · 3 comments

Comments

@thermech
Copy link

thermech commented May 31, 2016

I have a 2.1MB html. When I try to render the PDF, like this:

NodePDF.render(null, 'report.pdf', {
  'content': reportData,
  'viewportSize': {
    'width': 1440,
    'height': 900
  },
},function(err, filePath){
    console.log('err:' + err);
});

I got this error:

internal/child_process.js:298
    throw errnoException(err, 'spawn');
    ^

Error: spawn E2BIG
    at exports._errnoException (util.js:870:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at exports.spawn (child_process.js:362:9)
    at Object.exports.execFile (child_process.js:151:15)
    at Object.exports.exec (child_process.js:111:18)
    at Object.exports.exec (/report-project/node_modules/nodepdf/child.js:27:16)
    at /report-project/node_modules/nodepdf/index.js:133:20
    at /report-project/node_modules/nodepdf/child.js:38:12
    at ChildProcess.exithandler (child_process.js:204:7)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
@mouryaamit
Copy link

did you got any solution. I have the same issue

@mouryaamit
Copy link

With latest version I have got the issue. But I am able to get pdf with v1.2.0
npm install [email protected]

@thermech
Copy link
Author

thermech commented Jun 8, 2016

The only solution I found so far is to make smaller pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants