<?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[Render Docx to PDF without assigned template]]></title><description><![CDATA[<p>To save setting up a new docker to handle file conversion, we are wondering if we can use JSReports to handle the conversion from docx to pdf.  We have already proved that we can use unoconv to take the docx and get the PDF that we want.  Now we are trying to do it from our .NET app by passing in the docx file to the template and getting it to do the unoconv for us.  We are failing at getting it to pass in the whole template.  We have verified that the byte array and memory stream are valid.  We made the assumption that we need to base64 encode it.  When trying to pass the encoding type, it errors that it's a read-only property.</p>
<p>Here is the pseudo-code for what we do:<br />
Create a template in JSReports but don't put set the Docx, enabled Unoconv and output to PDF<br />
Load the template via OData to .NET Code<br />
Load the Docx from external source and set it using the follwoing:</p>
<pre><code>	testDocx = new Docx() {
		TemplateAsset = new Asset()
		{
			Content = {MyBase64String}
		}
	};
	conversionTemplate.Docx = testDocx;
</code></pre>
<p>Then call RenderAsync() passing in the template and NULL for data with the correct options.</p>
<p>I get this error:<br />
Report &quot;word&quot; render failed.</p>
<p>Error while executing docx recipe. end of central directory record signature not found<br />
Error: Error while executing docx recipe. end of central directory record signature not found<br />
at module.exports (/app-rprt/node_modules/@jsreport/jsreport-core/lib/shared/createError.js:10:13)<br />
at WorkerReporter.createError (/app-rprt/node_modules/@jsreport/jsreport-core/lib/shared/reporter.js:47:12)<br />
at /app-rprt/node_modules/@jsreport/jsreport-docx/lib/processDocx.js:93:20<br />
at async module.exports (/app-rprt/node_modules/@jsreport/jsreport-docx/lib/recipe.js:38:28)<br />
at async invokeRender (/app-rprt/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:95:5)<br />
at async WorkerReporter._render (/app-rprt/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:147:7)<br />
at async /app-rprt/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:179:19<br />
at async Domain.&lt;anonymous&gt; (/app-rprt/node_modules/@jsreport/advanced-workers/lib/workerHandler.js:141:19)<br />
caused by: Error: end of central directory record signature not found<br />
at /app-rprt/node_modules/yauzl/index.js:187:14<br />
at Immediate.&lt;anonymous&gt; (/app-rprt/node_modules/yauzl/index.js:624:38)<br />
at processImmediate (node:internal/timers:464:21)<br />
at process.topLevelDomainCallback (node:domain:152:15)<br />
at process.callbackTrampoline (node:internal/async_hooks:128:24)</p>
<p>Any assistance in being able to pass a full template content over and have it unoconv to pdf would be much appreciated.  It seems that if it doesn't have a ShortId to work with, it fails.</p>
]]></description><link>https://forum.jsreport.net/topic/2543/render-docx-to-pdf-without-assigned-template</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 14:35:33 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/2543.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Aug 2022 21:23:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Render Docx to PDF without assigned template on Tue, 23 Aug 2022 08:18:49 GMT]]></title><description><![CDATA[<p>To save setting up a new docker to handle file conversion, we are wondering if we can use JSReports to handle the conversion from docx to pdf.  We have already proved that we can use unoconv to take the docx and get the PDF that we want.  Now we are trying to do it from our .NET app by passing in the docx file to the template and getting it to do the unoconv for us.  We are failing at getting it to pass in the whole template.  We have verified that the byte array and memory stream are valid.  We made the assumption that we need to base64 encode it.  When trying to pass the encoding type, it errors that it's a read-only property.</p>
<p>Here is the pseudo-code for what we do:<br />
Create a template in JSReports but don't put set the Docx, enabled Unoconv and output to PDF<br />
Load the template via OData to .NET Code<br />
Load the Docx from external source and set it using the follwoing:</p>
<pre><code>	testDocx = new Docx() {
		TemplateAsset = new Asset()
		{
			Content = {MyBase64String}
		}
	};
	conversionTemplate.Docx = testDocx;
</code></pre>
<p>Then call RenderAsync() passing in the template and NULL for data with the correct options.</p>
<p>I get this error:<br />
Report &quot;word&quot; render failed.</p>
<p>Error while executing docx recipe. end of central directory record signature not found<br />
Error: Error while executing docx recipe. end of central directory record signature not found<br />
at module.exports (/app-rprt/node_modules/@jsreport/jsreport-core/lib/shared/createError.js:10:13)<br />
at WorkerReporter.createError (/app-rprt/node_modules/@jsreport/jsreport-core/lib/shared/reporter.js:47:12)<br />
at /app-rprt/node_modules/@jsreport/jsreport-docx/lib/processDocx.js:93:20<br />
at async module.exports (/app-rprt/node_modules/@jsreport/jsreport-docx/lib/recipe.js:38:28)<br />
at async invokeRender (/app-rprt/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:95:5)<br />
at async WorkerReporter._render (/app-rprt/node_modules/@jsreport/jsreport-core/lib/worker/render/render.js:147:7)<br />
at async /app-rprt/node_modules/@jsreport/jsreport-core/lib/worker/reporter.js:179:19<br />
at async Domain.&lt;anonymous&gt; (/app-rprt/node_modules/@jsreport/advanced-workers/lib/workerHandler.js:141:19)<br />
caused by: Error: end of central directory record signature not found<br />
at /app-rprt/node_modules/yauzl/index.js:187:14<br />
at Immediate.&lt;anonymous&gt; (/app-rprt/node_modules/yauzl/index.js:624:38)<br />
at processImmediate (node:internal/timers:464:21)<br />
at process.topLevelDomainCallback (node:domain:152:15)<br />
at process.callbackTrampoline (node:internal/async_hooks:128:24)</p>
<p>Any assistance in being able to pass a full template content over and have it unoconv to pdf would be much appreciated.  It seems that if it doesn't have a ShortId to work with, it fails.</p>
]]></description><link>https://forum.jsreport.net/post/11062</link><guid isPermaLink="true">https://forum.jsreport.net/post/11062</guid><dc:creator><![CDATA[zewar96]]></dc:creator><pubDate>Tue, 23 Aug 2022 08:18:49 GMT</pubDate></item><item><title><![CDATA[Reply to Render Docx to PDF without assigned template on Invalid Date]]></title><description><![CDATA[<p>Could you try to add the encoding as well?</p>
<pre><code>TemplateAsset = new Asset()
		{
			Content = {MyBase64String},
                        Encoding = &quot;base64&quot;                        
		}
</code></pre>
]]></description><link>https://forum.jsreport.net/post/11063</link><guid isPermaLink="true">https://forum.jsreport.net/post/11063</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Render Docx to PDF without assigned template on Invalid Date]]></title><description><![CDATA[<p>I will give that a try again today.  I tried it last time and i got an error about a Set not being allowed on a read only or something like that.  I will get you the exact error message though.</p>
]]></description><link>https://forum.jsreport.net/post/11064</link><guid isPermaLink="true">https://forum.jsreport.net/post/11064</guid><dc:creator><![CDATA[zewar96]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Render Docx to PDF without assigned template on Invalid Date]]></title><description><![CDATA[<p>I don't know i did wrong the other day, but adding Encoding to it worked!</p>
<p>Thanks...we can now use JSReports for document conversion of Docx to PDF!!</p>
]]></description><link>https://forum.jsreport.net/post/11065</link><guid isPermaLink="true">https://forum.jsreport.net/post/11065</guid><dc:creator><![CDATA[zewar96]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>