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

External imported fonts - randomly not rendered #25

Open
robert8888 opened this issue Apr 24, 2021 · 0 comments
Open

External imported fonts - randomly not rendered #25

robert8888 opened this issue Apr 24, 2021 · 0 comments

Comments

@robert8888
Copy link

robert8888 commented Apr 24, 2021

My page import fonts from adobe cdn. And they are randomly not render correctly. Approx 1 of 10 rendered fonts are not render at all or are used default fallback fonts. I struggle with this and i found solution.

Before render pdf i wait for fonts ready.

  //....
  // Output options if in debug mode
  if (cli.debug) {
    console.log(options);
  }
  await page.evaluateHandle('document.fonts.ready'); // add this line
  await page.pdf(options);
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

1 participant