wkhtmltopdf random SSL error



  • I seem to randomly get this error when running this template.

    Warning: SSL error ignored

    and then throws this at the end

    at ChildProcess.exithandler (child_process.js:275:12) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

    I have a template set up with a table of Contents as well as header and footers (with full html). I don't get this error all the time I would say maybe every 15-20 reports and then only that specific data that seems to be coming in for that one report. If I run an older report seems to work just fine. Then if I mess with the wkhtmltopdf settings, header, footer, css I can get it to run, but it still doesn't seem to run more consistently but it may still fail.

    If its something with the SSL error from what I can tell it seems to be resolved in wkhtmltopdf 0.12.5 Are there any plans to update the recipe to use 0.12.5?

    If you think its something else like maybe something in my code could be conflicting with wkhtmltopdf, any help with what I could check would be helpful.

    Or if there is another recipe that could create a TOC that I could use.

    Thanks for any help you can provide.



  • Warning: SSL error ignored

    I can only recommend searching wkhtmltopdf github issues if there is a solution
    https://github.com/wkhtmltopdf/wkhtmltopdf/issues

    I can tell it seems to be resolved in wkhtmltopdf 0.12.5

    You can replace the binary with the latest wkhtmltopdf here
    /node_modules/wkhtmltopdf-installer/vendor

    or, also I think the recipe will use the global wkhtmltopdf if it is found in the global path during the installation.

    Or if there is another recipe that could create a TOC that I could use

    We have TOC support for chrome in the preview. Check it here
    https://github.com/jsreport/jsreport-pdf-utils/issues/15



  • Thanks the TOC for Chrome is fantastic. However I'm trying to load the TOC data a bit differently but I'm not understanding why the <a> tags are not showing up.

    https://playground.jsreport.net/w/joshplaetzler/1_AaKeXr



  • I didn't look deep. However....

    In toc template you iterate over your computed data property Page.
    You compute it only when $pdf property is filled and this happens only during the merge operation.
    This means the main template doesn't print anything in the toc child template.
    So you don't see anything.

    The main template run should print the toc structure with a links.
    The merge operation should just insert the page numbers to the correct position.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.