I have my on-prem service checked in to version control. Can I safely add these files to .gitignore?
fs.journal
fs.version
profiles
I have my on-prem service checked in to version control. Can I safely add these files to .gitignore?
fs.journal
fs.version
profiles
Got it working. Red herring, fonts were fine.
Re: lambda fonts
I just ran into this one myself and am having trouble getting it working.
I have added jsreport.license.json
to my gitignore because I am checking this into our repo. I am planning to deploy this to Lambda. Do I need to install the license json or can I just use the license key in an environment variable?
We have a cloud instance and need to move to on-prem so we can integrate better with our CI/CD pipelines. Is there any information on the best way to port our document store over? Is it just a simple export then import? Also, is there a config that replicates the config of our cloud instance?
Also, how would licensing work? Should I just cancel the cloud and purchase the on-prem license once everything is transferred?
I am attempting to move our JSreport Online data to our Github repo, and in doing so I want to move away from stored templates. How can I embed dependencies like assets into my API call? I am slowly replacing references with actual content (parameterized) like below:
{
"template": {
"content": "{{templateContent}}",
"recipe": "chrome-pdf",
"engine": "handlebars",
"chrome": {
"printBackground": true,
"marginTop": "2cm",
"marginBottom": "2cm",
"displayHeaderFooter": false,
"mediaType": "print"
}
},
"context": {
"assets": [
{
"name": "template.css",
"content": "{{cssContent}}"
}
]
},
"data": "{{templateData}}",
"pdfOperations": [
{
"type": "merge",
"mergeWholeDocument": true,
"templateShortid": "Ufj99EA",
"enabled": true
},
{
"type": "prepend",
"templateShortid": "j66QyJa",
"enabled": true
},
{
"type": "merge",
"mergeWholeDocument": true,
"content": "{{footerContent}}",
"enabled": true
}
],
"helpers": "{{helpersContent}}",
"scripts": [],
"pdfAccessibility": {
"enabled": true
}
}
I am all of a sudden seeing errors like this when I try to generate a document:
Error when evaluating engine handlebars for template /request-for-quote-dev/request-for-quote-dev
(because) "npmModule" helper call failed
(because) unable to find module /tmp/jsreport/npm/modules/showdown@2.1.0/node_modules/showdown
The require calls:
require('/tmp/jsreport/npm/modules/showdown@2.1.0/node_modules/showdown')
require('/usr/src/app/tmp/jsreport/npm/modules/showdown@2.1.0/node_modules/showdown')
require('/usr/src/app/lib/tmp/jsreport/npm/modules/showdown@2.1.0/node_modules/showdown')
Error: Unable to find module /tmp/jsreport/npm/modules/showdown@2.1.0/node_modules/showdown
The package is here and it's the latest version: https://www.npmjs.com/package/showdown
I've not made any changes to the template.
Hi!
Is there a way to develop in JSReport online without affecting production templates?
Ideally if we could specify in the API to use the last commit from version control, that would be amazing. We could continue to develop in the JSReport UI without affecting production users, then commit the updates after we complete testing.
Is it possible to include expressions for calculated fields in PDF form fields?
https://helpx.adobe.com/sign/using/calculated-fields.html
Okay.. no problem. I'm just creating a pdfFormField for a client to fill out. By the way, passing functions for dynamic naming works, and you may want to add that to your docs
{{{pdfFormField
name=(ff "item_price" 10)
type="text"
backgroundColor="#ffdd00"
fontSize="10px"
width="90px"
height="24px"
}}}
Where ff
is just a concatenation function.
function ff (param1, param2) {
return `${param1}_${param2}`;
}
So the results will yield item_price_0, item_price_1, item_price_2, ...
Very cool!
I can't seem to get the PDF border to appear on form fields, referenced here
I am not seeing a way to allow for external modules in scripts in jsreportonline as there needs to be a modification to a configuration file?
Yes, jsreportonline
For branch, one could specify the branch name alongside the template name in the API request to render the PDF, and that branch would be used when retrieving the template assets.
I like the ability to make commits in the cloud UI, but would love it if we could integrate that with our own repo.
It would also be cool if we could specify a branch in the API so we can promote template changes to our dev, staging, prod environments.
Fixed!
For anyone lurking, adding this line to the top of the template fixes it:
<meta charset="UTF-8">
Rendering with the html
recipe works fine. How do I get it to work with chrome-pdf
? It doesn't seem to matter which font I use. The font does change in the PDF correctly, but the encoding is wrong.
Hello! Great product!
I am using the cloud service via the API. I have some special characters in my JSON, for example:
{ "data": { "name": "Divinityᴴᴰᴾ® Mist 24in x 24in" } }
But it does not render correctly in the PDF.
If I try to set Content-Encoding: utf8
I get an error.
How can I fix this?
Thank you!