Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji support #13

Closed
oneEyedSunday opened this issue Jun 14, 2019 · 3 comments
Closed

Emoji support #13

oneEyedSunday opened this issue Jun 14, 2019 · 3 comments

Comments

@oneEyedSunday
Copy link

Hello @AmirTugi I'm printing something that involves emojis.
They come out mangled like this
Screenshot 2019-06-14 at 2 47 57 PM

do I have to make any adjustments to the config, like encoding settings, since emojis are supposed to be unicode.

The emojis were ❎

@AmirTugi
Copy link
Owner

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?

@radiumrasheed
Copy link

radiumrasheed commented Jun 16, 2019

@AmirTugi at what point do I call...

page.setContent
instead of
page.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);
};

@oneEyedSunday
Copy link
Author

#12 proved helpful thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants