<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Generate pdf from docx template by unoconv always get timeout error.]]></title><description><![CDATA[<p>Hi, we want generate pdf from docx template in js report. We find the unoconv extension can do it, so we install unoconv on our js report server, the preview will timeout sometimes. if I retry print, it will works good and print a pdf.<br />
Our website is send the docx template bytes[] and json data both from java script, then js report server return the pdf to website. But the js report server always return timeout error. We check the auto clean folder, the doxc file created success the pdf file also created but the content didn't all convert.<br />
We set the timeout in js report config, but it looks not work.</p>
<pre><code>&quot;scripts&quot;: {
  &quot;timeout&quot;: 600000,
  &quot;strategy&quot;: &quot;http-server&quot;
},
&quot;sample-template&quot;: {
  &quot;createSamples&quot;: true
},
&quot;chrome-pdf&quot;: {
    &quot;timeout&quot;: 600000
},
&quot;unoconv&quot;: {
  &quot;command&quot;: &quot;python C:/jsreportapp/unoconv.js&quot;,
  &quot;timeout&quot;: 600000000
},
&quot;templatingEngines&quot;: {
  &quot;timeout&quot;: 6000000,
  &quot;strategy&quot;: &quot;http-server&quot;
}
</code></pre>
<p>Below is our send print request</p>
<pre><code>    var printCommand = {
        &quot;template&quot;: {
            &quot;recipe&quot;: &quot;docx&quot;,
            &quot;engine&quot;: &quot;handlebars&quot;,
            &quot;docx&quot;: {
                &quot;templateAsset&quot;: {
                    &quot;content&quot;: command.content, //word template bytes[]
                    &quot;encoding&quot;: &quot;base64&quot;
                }
            },
            &quot;unoconv&quot;: {
                format: &quot;pdf&quot;
            }
        },
        &quot;data&quot;: command.data //json data
    };
</code></pre>
<p>Below is the timeout error:<br />
&quot;Error: Timeout error during executing script<br />
at Timeout._onTimeout (C:\jsreportapp\node_modules\script-manager\lib\manager-servers.js:149:25)<br />
at ontimeout (timers.js:498:11)<br />
at Timer.unrefdHandle (timers.js:611:5)<br />
From previous event:<br />
at Reporter.executeScript (C:\jsreportapp\node_modules\jsreport-core\lib\reporter.js:360:47)<br />
at AsyncFunction.reporter.afterRenderListeners.add (C:\jsreportapp\node_modules\jsreport-unoconv\lib\unoconv.js:25:35)<br />
at C:\jsreportapp\node_modules\listener-collection\lib\listenerCollection.js:171:33<br />
at C:\jsreportapp\node_modules\listener-collection\lib\listenerCollection.js:151:16<br />
at runCallback (timers.js:810:20)<br />
at tryOnImmediate (timers.js:768:5)<br />
at processImmediate [as _immediateCallback] (timers.js:745:5)&quot;</p>
]]></description><link>https://forum.jsreport.net/topic/1618/generate-pdf-from-docx-template-by-unoconv-always-get-timeout-error</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 01:29:41 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/1618.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Jun 2020 06:18:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Generate pdf from docx template by unoconv always get timeout error. on Invalid Date]]></title><description><![CDATA[<p>Hi, we want generate pdf from docx template in js report. We find the unoconv extension can do it, so we install unoconv on our js report server, the preview will timeout sometimes. if I retry print, it will works good and print a pdf.<br />
Our website is send the docx template bytes[] and json data both from java script, then js report server return the pdf to website. But the js report server always return timeout error. We check the auto clean folder, the doxc file created success the pdf file also created but the content didn't all convert.<br />
We set the timeout in js report config, but it looks not work.</p>
<pre><code>&quot;scripts&quot;: {
  &quot;timeout&quot;: 600000,
  &quot;strategy&quot;: &quot;http-server&quot;
},
&quot;sample-template&quot;: {
  &quot;createSamples&quot;: true
},
&quot;chrome-pdf&quot;: {
    &quot;timeout&quot;: 600000
},
&quot;unoconv&quot;: {
  &quot;command&quot;: &quot;python C:/jsreportapp/unoconv.js&quot;,
  &quot;timeout&quot;: 600000000
},
&quot;templatingEngines&quot;: {
  &quot;timeout&quot;: 6000000,
  &quot;strategy&quot;: &quot;http-server&quot;
}
</code></pre>
<p>Below is our send print request</p>
<pre><code>    var printCommand = {
        &quot;template&quot;: {
            &quot;recipe&quot;: &quot;docx&quot;,
            &quot;engine&quot;: &quot;handlebars&quot;,
            &quot;docx&quot;: {
                &quot;templateAsset&quot;: {
                    &quot;content&quot;: command.content, //word template bytes[]
                    &quot;encoding&quot;: &quot;base64&quot;
                }
            },
            &quot;unoconv&quot;: {
                format: &quot;pdf&quot;
            }
        },
        &quot;data&quot;: command.data //json data
    };
</code></pre>
<p>Below is the timeout error:<br />
&quot;Error: Timeout error during executing script<br />
at Timeout._onTimeout (C:\jsreportapp\node_modules\script-manager\lib\manager-servers.js:149:25)<br />
at ontimeout (timers.js:498:11)<br />
at Timer.unrefdHandle (timers.js:611:5)<br />
From previous event:<br />
at Reporter.executeScript (C:\jsreportapp\node_modules\jsreport-core\lib\reporter.js:360:47)<br />
at AsyncFunction.reporter.afterRenderListeners.add (C:\jsreportapp\node_modules\jsreport-unoconv\lib\unoconv.js:25:35)<br />
at C:\jsreportapp\node_modules\listener-collection\lib\listenerCollection.js:171:33<br />
at C:\jsreportapp\node_modules\listener-collection\lib\listenerCollection.js:151:16<br />
at runCallback (timers.js:810:20)<br />
at tryOnImmediate (timers.js:768:5)<br />
at processImmediate [as _immediateCallback] (timers.js:745:5)&quot;</p>
]]></description><link>https://forum.jsreport.net/post/7325</link><guid isPermaLink="true">https://forum.jsreport.net/post/7325</guid><dc:creator><![CDATA[hexl84]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Generate pdf from docx template by unoconv always get timeout error. on Invalid Date]]></title><description><![CDATA[<p>Thank you for the question.</p>
<p>How long does the conversion normally take in the preview? And after how long it times out when making API call?</p>
<p>Note the <code>templatingEngines</code> node should be at the root level in the config and <code>unoconv</code> inside the <code>extensions</code> node.<br />
Since jsreport 2.7.0 it is also possible to use just single <code>&quot;timeout&quot;: 600000</code> at the config root for general timeout.</p>
]]></description><link>https://forum.jsreport.net/post/7328</link><guid isPermaLink="true">https://forum.jsreport.net/post/7328</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Generate pdf from docx template by unoconv always get timeout error. on Invalid Date]]></title><description><![CDATA[<p>Thanks, I fix the timeout issue as your solution, move the templatingEngines node to root level and set a root level timeout value, then the preview and print will not timeout.</p>
]]></description><link>https://forum.jsreport.net/post/7331</link><guid isPermaLink="true">https://forum.jsreport.net/post/7331</guid><dc:creator><![CDATA[hexl84]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Generate pdf from docx template by unoconv always get timeout error. on Invalid Date]]></title><description><![CDATA[<p>Great! Thank you for sharing the resolution.</p>
]]></description><link>https://forum.jsreport.net/post/7336</link><guid isPermaLink="true">https://forum.jsreport.net/post/7336</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>