Git Product home page Git Product logo

Comments (5)

Zulko avatar Zulko commented on May 17, 2024

Does it work for the original example ?

from relaxed.

Ciantic avatar Ciantic commented on May 17, 2024

What is original example?

But I found out if I comment out this:

  var options = {
    path: outputPath,
    // displayHeaderFooter: headerTemplate || footerTemplate,
    headerTemplate,
    footerTemplate,
    printBackground: true
  }

It works again.

Not sure why displayHeaderFooter makes it crash.

from relaxed.

Ciantic avatar Ciantic commented on May 17, 2024

oh sorry, yes, the example is original, I only add and remove a one letter in it to make it try the compilation.

from relaxed.

Zulko avatar Zulko commented on May 17, 2024

Thanks for the report. It turns out that in puppeteer >1.0.0 the PDF rendering crashes if the header or footer has some CSS which imports a font. Not sure why or if it is a more generic problem. The example is now fixed, but the footer font is now Helvetica instead of being a cool google font :(

from relaxed.

DanielRuf avatar DanielRuf commented on May 17, 2024

Thanks for the report. It turns out that in puppeteer >1.0.0 the PDF rendering crashes if the header or footer has some CSS which imports a font. Not sure why or if it is a more generic problem. The example is now fixed, but the footer font is now Helvetica instead of being a cool google font

Sounds like a promise / remote content related issue.
Google fonts can also be used / hosted offline, see
https://github.com/majodev/google-webfonts-helper
https://google-webfonts-helper.herokuapp.com/fonts
https://github.com/DanielRuf/google-webfonts-downloader

from relaxed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.