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

#1
[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.

#2
[eluser]solid9[/eluser]
yes the same level with application and system.

#3
[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..

#4
[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.


#5
[eluser]TWP Marketing[/eluser]
I've not used this helper, but did you load it, either in config/autoload.php or in the controller?

#6
[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

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

#8
[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.

#9
[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-2019 MyBB Group.