Git Product home page Git Product logo

Comments (6)

strunkie30 avatar strunkie30 commented on July 18, 2024

Solved by install system fonts.

from node-html-pdf.

SFantasy avatar SFantasy commented on July 18, 2024

@strunkie30 Hi, I'm using this module and got the same question as you mentioned.

I'm not clear about "install system fonts", is that meaning that I should install fonts using in my HTML file on my server(CentOS)?

from node-html-pdf.

strunkie30 avatar strunkie30 commented on July 18, 2024

The PDF printer can't print your document because a clean CentOS installation does not include fonts.
Windows and OSx has by default some fonts installed: https://en.wikipedia.org/wiki/List_of_typefaces_included_with_OS_X

You can find multiple fontpacks on the internet for CentOS:
http://www.itzgeek.com/how-tos/linux/centos-how-tos/how-to-install-microsoft-truetype-fonts-in-centos-6-rhel-6.html#axzz3hGwfK1Gw

If you are using custom fonts from Google fonts or Typekit you can append them normaly, your fonts will be rendered fine. But Arial is not included in CentOS.

Sorry for my bad english 😄

from node-html-pdf.

marcbachmann avatar marcbachmann commented on July 18, 2024

@strunkie30 thanks for answering

from node-html-pdf.

SFantasy avatar SFantasy commented on July 18, 2024

@strunkie30

Thanks, I've solve the problem by

yum install cjkuni-ukai-fonts 

Although the fonts looks a little strange, maybe I should find another fonts 😃

from node-html-pdf.

marcbachmann avatar marcbachmann commented on July 18, 2024

There's an install script for microsoft fonts:
https://github.com/marcbachmann/dockerfile-phantomjs2/blob/master/Dockerfile#L4-L7

from node-html-pdf.

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.