Base64 encoded pdf content in API request
Closed this issue · 1 comments
pofider commented
I started to use this format for sending base64 encoded content instead of the referenced asset.
https://github.com/jsreport/jsreport-pdf-sign/blob/master/test/pdfSignTest.js#L116
reporter.render({
template: {
content: 'Hello',
engine: 'none',
recipe: 'chrome-pdf',
pdfSign: {
certificateAsset: {
content: fs.readFileSync(path.join(__dirname, 'certificate.p12')).toString('base64'),
encoding: 'base64',
}
}
})
The same is here in the docxtemplater.
It sounds this will be occurring quite often in our API so it would be better to unite it.
@bjrmatos What you think?
bjrmatos commented
done as part of 0.2.0
and the encoding
property is required instead of setting some default