sdglhm / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Unable to find a suitable font replacement - dompdf_0-6-0_beta1 #191

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
-Apache 2.2.x on Windows with PHP 5.3.3 and dompdf_0-6-0_beta1

-When I try to use this version of dompdf, get a Exception with follow message 
"Unable to find a suitable font replacement..."

Piece of code used:
$dompdf = new DOMPDF();
$dompdf->load_html_file(url_current_().'teste.html');
$dompdf->render();
$dompdf->stream("sample.pdf");

Please provide any additional information below.
- I discover the solution to work on both Linux and Windows OS.

In file: include/font_metrics.cls.php
In line: 219
It has: if ( !is_readable(self::CACHE_FILE) )
Should be replaced by: if (!file_exists(self::CACHE_FILE) )

Works fine for me at both OS.

Original issue reported on code.google.com by djalmaol...@gmail.com on 29 Oct 2010 at 2:36

GoogleCodeExporter commented 9 years ago
This worked for me :D thanks. I have upgraded from @version 0.5.1to the lastest 
beta

Original comment by mauroasp...@gmail.com on 2 Dec 2010 at 3:24

GoogleCodeExporter commented 9 years ago
I'm not sure why this would be the case since is_readable() should also check 
for the file's existence. We'll look into the change, though.

Original comment by eclecticgeek on 2 Dec 2010 at 7:58

GoogleCodeExporter commented 9 years ago
its not working for me 

Original comment by bhosale....@gmail.com on 2 Feb 2011 at 11:28

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00