<?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[Pdf-utils documentation]]></title><description><![CDATA[<p>I try create simple pdf with footer and header. It create both on one place.<br />
I hope for help because obviously my Columbo skills are poor for search solution in github or somewhere.</p>
<p>My vision -&gt; I would like create page with picture in header, pager in footer and content ofcourse.</p>
<p>My sample code</p>
<pre><code>		await jsreport.documentStore.collection('templates').insert({
			content: '&lt;div style&quot;height: 15mm;background-color: yellow;&quot;&gt;Vokurka&lt;/div&gt;',
			shortid: 'header',
			name: 'header',
			engine: 'none',
			chrome: {
				width: '15mm',
				height: '15mm'
			},
			recipe: 'chrome-pdf'
		})

		await jsreport.documentStore.collection('templates').insert({
			content: '&lt;div style&quot;height: 20mm;background-color: cyan;&quot;&gt;Kedlubna&lt;/div&gt;',
			shortid: 'footer',
			name: 'footer',
			engine: 'none',
			chrome: {
				width: '15mm',
				height: '15mm'
			},
			recipe: 'chrome-pdf'
		})

		resp = await jsreport.render({
			template: {
				content: '&lt;p&gt;&lt;%= magicWord %&gt; je male zviratko&lt;/p&gt;',
				engine: 'ejs',
				recipe: 'chrome-pdf',
				pdfOperations: [
                                                { type: 'merge', renderForEveryPage: true, templateShortid: 'header' },
                                                { type: 'merge', renderForEveryPage: true, templateShortid: 'footer' }
                                               ],
				chrome: {
					//waitForJS: true,
					format: 'A6',
					landscape: true,
					marginTop: '20mm',
				}
			},
			data: {
				magicWord: &quot;Telatko&quot;,
			},

		})
</code></pre>
]]></description><link>https://forum.jsreport.net/topic/706/pdf-utils-documentation</link><generator>RSS for Node</generator><lastBuildDate>Wed, 17 Jun 2026 00:34:26 GMT</lastBuildDate><atom:link href="https://forum.jsreport.net/topic/706.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Sep 2018 14:10:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pdf-utils documentation on Invalid Date]]></title><description><![CDATA[<p>I try create simple pdf with footer and header. It create both on one place.<br />
I hope for help because obviously my Columbo skills are poor for search solution in github or somewhere.</p>
<p>My vision -&gt; I would like create page with picture in header, pager in footer and content ofcourse.</p>
<p>My sample code</p>
<pre><code>		await jsreport.documentStore.collection('templates').insert({
			content: '&lt;div style&quot;height: 15mm;background-color: yellow;&quot;&gt;Vokurka&lt;/div&gt;',
			shortid: 'header',
			name: 'header',
			engine: 'none',
			chrome: {
				width: '15mm',
				height: '15mm'
			},
			recipe: 'chrome-pdf'
		})

		await jsreport.documentStore.collection('templates').insert({
			content: '&lt;div style&quot;height: 20mm;background-color: cyan;&quot;&gt;Kedlubna&lt;/div&gt;',
			shortid: 'footer',
			name: 'footer',
			engine: 'none',
			chrome: {
				width: '15mm',
				height: '15mm'
			},
			recipe: 'chrome-pdf'
		})

		resp = await jsreport.render({
			template: {
				content: '&lt;p&gt;&lt;%= magicWord %&gt; je male zviratko&lt;/p&gt;',
				engine: 'ejs',
				recipe: 'chrome-pdf',
				pdfOperations: [
                                                { type: 'merge', renderForEveryPage: true, templateShortid: 'header' },
                                                { type: 'merge', renderForEveryPage: true, templateShortid: 'footer' }
                                               ],
				chrome: {
					//waitForJS: true,
					format: 'A6',
					landscape: true,
					marginTop: '20mm',
				}
			},
			data: {
				magicWord: &quot;Telatko&quot;,
			},

		})
</code></pre>
]]></description><link>https://forum.jsreport.net/post/3504</link><guid isPermaLink="true">https://forum.jsreport.net/post/3504</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Pdf-utils documentation on Invalid Date]]></title><description><![CDATA[<ol>
<li>
<p>You should be able to reach the goals you mentioned also with the native header and footer. <a href="https://jsreport.net/learn/chrome-pdf#native-headers-and-footers" rel="nofollow">https://jsreport.net/learn/chrome-pdf#native-headers-and-footers</a></p>
</li>
<li>
<p>It is better for beginners to start jsreport studio and design the template you need there. If you want to do everything dynamically in node you can check the data files studio creates and repeat the same.</p>
</li>
<li>
<p>There are some problems in the particular code you shared.</p>
</li>
</ol>
<ul>
<li>you should not mix page sizes when merging multiple pdfs. So remove the format and chrome width/height.</li>
<li>don't mix page orientation when merging pdfs. So remove chrome.landscape</li>
<li>the both header and footer are rendered to the same place. Make sure you position footer to the page bottom</li>
<li>you are missing chrome marginBottom in the main page</li>
</ul>
<p>The best is really to open studio and check examples in the docs<br />
<a href="https://jsreport.net/learn/pdf-utils" rel="nofollow">https://jsreport.net/learn/pdf-utils</a><br />
For example this one<br />
<a href="https://playground.jsreport.net/w/anon/BkEHf9MNG-5" rel="nofollow">https://playground.jsreport.net/w/anon/BkEHf9MNG-5</a></p>
]]></description><link>https://forum.jsreport.net/post/3520</link><guid isPermaLink="true">https://forum.jsreport.net/post/3520</guid><dc:creator><![CDATA[jan_blaha]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Pdf-utils documentation on Invalid Date]]></title><description><![CDATA[<p>Ad 1  Yes, but i simplify my solution. For example content 'Vokurka' could be  '{{$pdf.pageNumber}}/{{$pdf.pages.length}} ta Vokurka'.<br />
Ad 2  Is it possible get source code from studio, I did not find it (please explain me)<br />
Ad 3  3.bullet I did not find it how to define position from doc and <a href="https://github.com/jsreport/jsreport-pdf-utils/blob/master/test/test.js" rel="nofollow">GitHub</a> neither.</p>
]]></description><link>https://forum.jsreport.net/post/3563</link><guid isPermaLink="true">https://forum.jsreport.net/post/3563</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>