0

Using node-html-pdf library for pdf generation (now it is deprecated, in future we'll switch to puppeteer) and if to use some font from external source by url (for example, google fonts), pdf is generated as image. Only if to use system fonts, pdf is generated as text (can be selected and copied). The service for pdf-generation is on Heroku.

Tried to install font in console (thought it would be installed into Heroku's machine), didn't work.

Tried using heroku-buildpack-google-fonts buildpack, but still font displayed in pdf is some from system's default ones (ubuntu/linux). As well as using font from local folder, having .ttf file in the project.

Also tried (during app build in postinstall) copying font to some created folder and updating font cache (fc-cache -f -v). No success.

Maybe somebody is aware why buildpack didn't work or maybe how to install font in Heroku globally? Thanks

Iri.S.M.
  • 43
  • 4

0 Answers0