• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

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.

yes the same level with application and system.

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..

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
if(!defined('BASEPATH')) exit('No direct script access allowed');

function to_dompdf($html){
$dompdf=new DOMPDF();
$dompdf->set_paper('letter', 'landscape');
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?

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
Path where I have dompdf: /application/helpers/dompdf
should be this:
Path where I should have dompdf: /system/helpers/dompdf

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.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.