dompdf |
[eluser]jtan[/eluser]
Is there official way where to put DOMPDF folder on CodeIgniter? Or same folder/level with Application? My settings are correct and samples are all working fine but my DOMPDF is not working correctly.
[eluser]jtan[/eluser]
do I miss anything, the setup of DOMPDF change the default paper size to A5 when I set it to A5 but when I generate PDF, it's still letter size..
[eluser]claudia_ef[/eluser]
Hi! I was trying several times configure dompdf as a helper en CI 2.0. But it does not work out. Path where I have dompdf: /application/helpers/dompdf Dompdf helper: /application/helpers/to_dompdf_helper.php /******************************/ <?php if(!defined('BASEPATH')) exit('No direct script access allowed'); function to_dompdf($html){ require_once("dompdf/dompdf_config.inc.php"); $dompdf=new DOMPDF(); $dompdf->load_html($html); $dompdf->set_paper('letter', 'landscape'); $dompdf->render(); $dompdf->stream("hello_world.pdf"); } /******************************/ ?> This function is executing in a test view. I've added dompdf helper in the helper array in /application/config/autoload.php I realized when I created the object, this didn't show its methods. Always shows this error: Fatal error: Call to undefined method Dompdf::load_html() in /var/www/dashdev2.serverxyz.com/application/helpers/to_dompdf_helper.php on line 8 I don't know If I'm doing something wrong. Please, need your help. Thanks.
[eluser]TWP Marketing[/eluser]
I've not used this helper, but did you load it, either in config/autoload.php or in the controller?
[eluser]claudia_ef[/eluser]
I did it but I've got a fatal error. I've already put the to_dompdf_helper.php in config/autoload.php
[eluser]TWP Marketing[/eluser]
Looking at the github wiki: https://github.com/EllisLab/CodeIgniter/...ing-dompdf this: Code: Path where I have dompdf: /application/helpers/dompdf Code: Path where I should have dompdf: /system/helpers/dompdf
[eluser]claudia_ef[/eluser]
I guess both path are similars. I'd prefer put dompdf files in application/helpers path because system path takes part of the CI core. I'm going to try with github wiki.
[eluser]TWP Marketing[/eluser]
The quickest test is to move dompdf.php into the system/helpers folder, check permissions and run the app. It either works or not. |
Welcome Guest, Not a member yet? Register Sign In |