CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • wkhtmltopdf civicrm font issue
Pages: [1]

Author Topic: wkhtmltopdf civicrm font issue  (Read 575 times)

jpilantrose

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Wordpress
  • MySQL version: 5.5.40-cll
  • PHP version: 5.4.35
wkhtmltopdf civicrm font issue
February 19, 2015, 07:32:19 am
Hi guys,

I'm having an issue where my pdf export entirely ignores the fonts that I've used in the KCeditor. I want my print out to show Georgia but instead it appears as some generic sans-serif font. When I dig into the generated pdf, I find "NimbusSanL-Regu" called late in the file. How do I turn this override off and get my WYSIWYG fonts to show up correctly?

I'm running the newest version of Wordpress and CiviCRM. I installed wkhtmltopdf to fix a white screen error I was getting with CiviCRM when exporting more than a couple of pdfs at a time.

I thought this sounded like my problem but editing the print.css file doesn't seem to have an effect. http://forum.civicrm.org/index.php/topic,30106.msg128996.html#msg128996

Any help will be greatly appreciated!

jaapjansma

  • I post frequently
  • ***
  • Posts: 247
  • Karma: 9
    • CiviCoop
  • CiviCRM version: 4.4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.4
Re: wkhtmltopdf civicrm font issue
February 20, 2015, 08:52:42 am
I am not sure but it might be that the fonts you want you use could not be found by wkhtmltopdf.
Developer at Edeveloper / CiviCoop

krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Re: wkhtmltopdf civicrm font issue
February 22, 2015, 07:53:58 am
When I was adding a font I ended up editing 3 files: css/print.css, /packages/ckeditor/skins/moono/editor.css, and /packages/ckeditor/content.css. A couple of those are minified so a pain to edit.

But if it's not finding the font like @jaapjansma suggests, it might need installing to the OS - what are you running?

As it happens I'm having this same exact problem at the moment - we're just moving to a new server (previously Ubuntu, now CentOS), and wkhtmltopdf refuses to render Calibri, despite it being installed everywhere I can think of. Worked on the old one, though, so must be doable :-) Will update if I get anywhere...

(btw if it's any use I threw together a hacky extension that provides an option to export to HTML rather than PDF - helps with looking for CSS issues. Can send it over if it'd help)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • wkhtmltopdf civicrm font issue

This forum was archived on 2017-11-26.