tried the reportName and it also does not have any effect.
filename is still like: 3a4f2114-63e6-4eba-9329-df6d55011b9b.pdf
happy to provide source code. how should i transfer it to you?
tried the reportName and it also does not have any effect.
filename is still like: 3a4f2114-63e6-4eba-9329-df6d55011b9b.pdf
happy to provide source code. how should i transfer it to you?
Sorry. Not true what I told before.
My options already where outside the template.
This is what I currently have but the PDF title is still a random value!?
options: {
"Content-Disposition": "attachment; filename=Terminzettel.pdf"
}
ctx.response.body = result.content;
ctx.set('Content-Type', 'application/pdf');
ctx.set('Content-Disposition', 'attachment; filename=Terminzettel.pdf');
Hi,
I am using the following option within template to provide the filename for the pdf but the result is a random string instead of the "Terminzettel.pdf":
options: {
"Content-Disposition": "attachment; filename=Terminzettel.pdf"
}
Appreciate your help!
Jens
Hey,
I am using phantom PDF and try to provide some text in bold (<b>some text</b>) in my template. However the text is not printed in bold in the PDF.
Where is the error?
Many THX
sorry, let me try to explain:
this is what i currently include in the API call:
phantom: {
footer: <div style="text-align:center; font-size: 6pt; font-family: 'Glober', sans-serif;">Seite {#pageNum} von {#numPages} - erstellt mit www.pododesk.de</div>
,
footerHeight: '0.8cm',
height: '148mm',
width: '105mm',
margin: { "top": "0.6cm", "left": "0.6cm", "right": "0.6cm", "bottom": "0cm" }
}
how can I now drag height and width from a value in my database instead of passing it on hardcoded?
if the value for one of the settings (ie the format "A6") should be dynamically copied from a value in the DB, can you help me to find the right syntax.
i.e.: {{:pdfSettings.noshowFormat}} --> pdfSettings being a table and Format being the respective column in the table.
I tried it already as the variable has been defined but it seems not be available in the phantom arguments!?
cool, works. sorry for the stupid questions. i am very new to this!
awsome, that is what i am lokking for. however, i get the following result when debugging after creating the logRequests.js:
+0 Starting rendering request 174
+2 Rendering template {shortid:ryIhC8L6l, recipe:phantom-pdf,engine:handlebars}
+3 Adding sample data HJ2pCUUTe
+4 Resources not defined for this template.
+8 Replaced assets ["Invoice styles.css","Invoice logo.png"]
+8 Rendering engine handlebars
+12 Taking compiled template from engine cache
+12 Calculating item Website design; you should see this message in debug run
+15 Replaced images []
+17 Executing recipe phantom-pdf
+17 Starting child request to render pdf footer
+18 Starting rendering request 175
+19 Rendering template {shortid:ryIhC8L6l, recipe:html,engine:handlebars}
+19 Inline data specified.
+20 Resources not defined for this template.
+21 Rendering engine handlebars
+25 Taking compiled template from engine cache
+25 Replaced images []
+26 Executing recipe html
+26 Skipping storing report.
+26 Rendering request finished 175
+26 Rendering request 175 finished in 9 ms
+13 Converting in http server based phantomjs 1.9.8
+14 Request file:///C%3A%5Cjsreport%5Cplayground-service2%5Ctemp%5C071f4d70-70df-11e8-bef8-376096af044fhtml.html
+123 phantom-pdf recipe finished with 1 pages generated
+123 Skipping storing report.
+127 Rendering request finished 174
when i setup the details in the sidebar of the playground. where do i find the following code to copy and paste (as an example):
footerHeight: '1cm',
height: '148mm',
width: '105mm'
margin: { "top": "0.6cm", "left": "0.6cm", "right": "0.6cm", "bottom": "0cm" }
One more question on this. When I use the playground to test my settings, where can I find the respective styling code to copy it to my apps code?
that did the trick. thanks for the quick help!
is it this one:
template:{
content: pdfTemplate,
engine: 'jsrender',
recipe: 'phantom-pdf',
phantom: {
format: A6
}
},
i haven't set the format (or the respective width and height) before...
the "paper width/height" is a good hint. can you point me to the documentation where i can find how to properly set that up. i think that might solve it...
Hi,
we use jsreport to generate a PDF from our web app. We setup the template to contain the page height and width in mm within the body of the HTML template.
This does not seem to be the right way to set the actual paper size. Can someone help me to solve this for the paper size to be individualy set. Thanks!