Big Problem With DomPDF |
[eluser]mdavis1982[/eluser]
Hi all... I'm trying to get DomPDF working with CI using Derek's Wiki entry as a guide (http://www.codeigniter.com/wiki/PDF_gene...ng_dompdf/). I have the following in my to_pdf_pi.php file (located in system/plugins/) Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); I've got the following in my controller: Code: function test() And I have the following in my view file (it's just one of the demos from the DomPDF distribution at the moment): Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> When I try to run the function from my controller I get the following error messages: Quote:A PHP Error was encountered If anyone could help me to solve this I would be most grateful as I have to get it working today for a client's site! If anyone is wondering as well, I'm developing on Mac OS X 10.5.1, PHP 5.2.4, CI 1.5.3 and DomPDF 0.5.1. Thanks in advance guys... Matt
[eluser]mdavis1982[/eluser]
Okay.. I think I have fixed it now... Basically there was a permissions error on the dompdf/lib/fonts/ directory. Using chmod a+x on it made everything work as expected! Hope this maybe helps someone! Cheers... Matt
[eluser]yesov[/eluser]
Hi! i have a similar problem. if i set $stream=TRUE see "Unable to stream pdf: headers already sent" without any errors. and permision for folders is 777 what's wrong ?
[eluser]industrial[/eluser]
Hi! Are having the same issue, did you solve it?
[eluser]industrial[/eluser]
[quote author="industrial" date="1256518103"]Hi! Are having the same issue, did you solve it?[/quote] Big shame on me for not googling properly! Here's a solution that did solve my issue: http://ellislab.com/forums/viewthread/89418/ What I did was to remove the ending ?> at the plugin file and Dompdf now works as a charm!
[eluser]uk81[/eluser]
Hi. I had an similar error. Got also the message: Code: Severity: Warning But the suggestions from above doesn´t work / help. Than I searched the internet and found the files php_Times-Roman.afm (and also as italic and bold) to download from a server. I download the files and put it into the dompdf/lib/fonts/ folder and now it works. The problem was: The 3 Times-Roman afm-files were not in the fonts-folder. Now it works fine. |
Welcome Guest, Not a member yet? Register Sign In |