I am using dompdf 0.6.0 beta 3 on a Drupal 7 site (via the Print module). I'm trying to use the Ubuntu font from here:
http://www.fontsquirrel.com/fonts/ubuntu
I used the font tool at http://eclecticgeek.com/dompdf/load_font.php to generate ufm files from the ttf files. The font files I uploaded to ..../dompdf/lib/fonts/ are:
Ubuntu-B-webfont.ttf
Ubuntu-B-webfont.ufm
Ubuntu-BI-webfont.ttf
Ubuntu-BI-webfont.ufm
Ubuntu-I-webfont.ttf
Ubuntu-I-webfont.ufm
Ubuntu-R-webfont.ttf
Ubuntu-R-webfont.ufm
The entry in dompdf_font_family_cache.dist.php is:
'ubuntu' =>
array (
'normal' => DOMPDF_FONT_DIR . 'Ubuntu-R-webfont',
'bold' => DOMPDF_FONT_DIR . 'Ubuntu-B-webfont',
'italic' => DOMPDF_FONT_DIR . 'Ubuntu-I-webfont',
'bold_italic' => DOMPDF_FONT_DIR . 'Ubuntu-BI-webfont',
),
I also have the stylesheet from fontsquirrel.com's font face kit, which uses the @font-face method, but that isn't working either. My css looks like this:
.cs_subheading{
font-family:ubuntu,UbuntuRegular,Arial,Helvetica,sans-serif;
}
When I go back to drupal admin after generating a pdf, I get errors like this:
Notice: Undefined index: /home/********/public_html/************/sites/all/libraries/dompdf/lib/fonts/Ubuntu-R-webfont in Text_Renderer->render() (line 89 of /home/********/public_html/************/sites/all/libraries/dompdf/include/text_renderer.cls.php).
What am I doing wrong??
Susanna, were you ever able to fix this issue? I'm running into the very same problem.Thanks!
--
You received this message because you are subscribed to a topic in the Google Groups "dompdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dompdf/wziuLJNe0g0/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to dompdf+un...@googlegroups.com.
To post to this group, send email to dom...@googlegroups.com.
Visit this group at http://groups.google.com/group/dompdf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
<span style='color: #000'>10 frames</span> <span style='color: #900'>34,304 KB</span> <span style='color: #090'>593.20 ms</span> <span style='color: #009' title='Quirksmode'><span style='color: #c00'>ON</span></span><br /><b>DOMPDF Warnings</b><br><pre>'_dompdf_appearance' is not a valid CSS2 property.
'_dompdf_appearance' is not a valid CSS2 property.
'_dompdf_appearance' is not a valid CSS2 property.
'_dompdf_appearance' is not a valid CSS2 property.
'_dompdf_appearance' is not a valid CSS2 property.
'_dompdf_appearance' is not a valid CSS2 property.
'_dompdf_appearance' is not a valid CSS2 property.
'zoom' is not a valid CSS2 property.
'_moz_box_sizing' is not a valid CSS2 property.
'_webkit_box_sizing' is not a valid CSS2 property.
'box_sizing' is not a valid CSS2 property.
'_moz_border_radius' is not a valid CSS2 property.
'_webkit_border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'_moz_border_radius' is not a valid CSS2 property.
'_webkit_border_top_left_radius' is not a valid CSS2 property.
'_webkit_border_top_right_radius' is not a valid CSS2 property.
'_webkit_border_bottom_left_radius' is not a valid CSS2 property.
'_webkit_border_bottom_right_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'_moz_border_radius' is not a valid CSS2 property.
'_webkit_border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'text_shadow' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'_moz_border_radius' is not a valid CSS2 property.
'_webkit_border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'overflow_x' is not a valid CSS2 property.
'overflow_y' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'box_shadow' is not a valid CSS2 property.
'border_radius' is not a valid CSS2 property.
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Helvetica - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Helvetica - Helvetica
metrics: Helvetica.afm, cache: Helvetica.afm.php
openFont: build php file from [path to dompdf]/dompdf/lib/fonts/Helvetica.afm
selectFont: checking for - [path to dompdf]/dompdf/lib/fonts/Helvetica.
selectFont: pfb or ttf file not found, ok if this is one of the 14 standard fonts
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
selectFont: selecting - [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - , 1
openFont: [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv - Whitney-Book-Adv
metrics: Whitney-Book-Adv.afm, cache: Whitney-Book-Adv.afm.php
openFont: no font file found for [path to dompdf]/dompdf/lib/fonts/Whitney-Book-Adv. Do you need to run load_font.php?
</pre>