Welcome Guest, Not a member yet? Register   Sign In
Error in create pdf file!!
#1

[eluser]suba[/eluser]
Hi ,

I follow your steps to create pdf file.
But i got some error.
Please advise to me.

My contoller
—————-
funtion certificate()
{
this->load->plugin(‘to_pdf’);
$html = $this->load->view(‘pdf_view’, $this->data);
pdf_create($html, ‘filename’);
}
ERROR
—————
Fatal error: Uncaught exception ‘DOMPDF_Exception’ with message ‘Requested HTML document contains no data.’ in C:\xampp\htdocs\sims\system\plugins\dompdf\include\frame_tree.cls.php:135 Stack trace: #0 C:\xampp\htdocs\sims\system\plugins\dompdf\include\dompdf.cls.php(293): Frame_Tree->build_tree() #1 C:\xampp\htdocs\sims\system\plugins\dompdf\include\dompdf.cls.php(377): DOMPDF->_process_html() #2 C:\xampp\htdocs\sims\system\plugins\to_pdf_pi.php(9): DOMPDF->render() #3 C:\xampp\htdocs\sims\system\application\controllers\graduation.php(49): pdf_create(NULL, ‘filename’) #4 C:\xampp\htdocs\sims\system\codeigniter\CodeIgniter.php(236): Graduation->certificate(‘nric’, ‘S9416122C’) #5 C:\xampp\htdocs\sims\index.php(124): require_once(‘C:\xampp\htdocs…’) #6 {main} thrown in C:\xampp\htdocs\sims\system\plugins\dompdf\include\frame_tree.cls.php on line 135
#2

[eluser]stommert[/eluser]
Hi,

I have been working with dompdf since yesterday. I work with a LAMP environment. In some cases XAMP behaves different than LAMP, so you might have different problems.
This is what I encountered, and how I debugged it.

1. make sure that apache has rights to access dompdf
2. make sure your path is set correctly within your plugin (I don't like plugins, so I made it a library, but it makes no difference).

I tested it by 'echoing' hello world and exiting the script/object.

So the dompdf class was initiated and I tried to create a pdf by sending a stating HTML document to the class. That was when I got errors. By searching the internet on the error I found out that the default memory of 16M was not enough.
In my php.ini I changed the 16M for 1000M witch might be a slight overkill ;-) , but it worked. Someware between 16M and a 1000M will be enough.

I hope this will give you some pointers to solve your problem.

gr.

Stommert
#3

[eluser]suba[/eluser]
Hi,
Thanks for reply.

But i can't rectify this error.

please give any more suggestion.

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB