render.js fails to start if `stdin.length` exceeds system's command length
Because Pdf arguments are eventually passed in to the phantomjs script as command line arguments, if their combined length is too long the command can exceed the system's maximum command length. When this happens render.js fails to execute, but this case is not checked so the call to Pdf hangs indefinitely. I ran in to this problem by setting opts.content to a large html string composed of embedded base64 images. You will find an example of the issue in the gist below. I have a fix that spawns off an instance of getconf and emits and error if the phantomjs command exceeds the system's limit but I think the ideal solution would be to stream Pdf arguments in to render.js through stdin after the script starts. That way there would not be a limit at all.
https://gist.github.com/chris--young/be26ebf352643df4773f
You're right. I'll consider to fix this the next few days. Otherwise, pull requests are always welcome ;)
I will submit a pull request after testing.
we would love to have a fix for this, as its impacting our app as well. Thank you
This feature has always given users a bit of trouble, @openpathgit is serving the html too much of a problem that you need to send it in via the module?