Closed oneEyedSunday closed 5 years ago
Hi! That sounds weird. Like it should've indeed worked out of the box. Can you take a look at #12 and tell me if at helped you?
@AmirTugi at what point do I call...
page.setContent
instead ofpage.goto('data:text/html'...
module.exports = async(data, file_path) => {
const styleOptions = {
// Get relative path from cwd to the desired file
file: path.resolve(__dirname, 'style.scss')
};
// Get relative path from cwd to the desired file
const htmlTemplatePath = path.resolve(__dirname, file_path);
const pdfOptions = {
format: 'A4',
printBackground: true
};
const teaSchoolOptions = {
styleOptions,
htmlTemplatePath,
htmlTemplateOptions: data,
pdfOptions
};
// We just wait for the pdf to generate, and then the program can exit
return TeaSchool.generatePdf(teaSchoolOptions);
};
Hello @AmirTugi I'm printing something that involves emojis. They come out mangled like this
do I have to make any adjustments to the config, like encoding settings, since emojis are supposed to be unicode.
The emojis were ❎