DomPDF help!! |
[eluser]andregufc[/eluser]
I'm from Portugal, and i can't speack english, my english is not good, but please help me. I have a form with results of a search, and have one checkbox for each result. If I select more of 5 results, the pdf not display. My code: ************************************************* $this->load->plugin('to_pdf'); $sql='WHERE'; foreach($_POST['opcoes'] as $selecionados){ $sql .= ' Imo_Codigo=\''.$selecionados.'\' OR '; } $dados['results'] = $this->db->query('SELECT * FROM Imovel '.$sql.'Imo_Codigo = \'FINALIZA_OR\''); $html = $this->load->view('cadimobiliario_modoficha', $dados, true); pdf_create($html, 'Pesquisa Imovel', 'landscape'); ************************************************* if i select 1,2,3,4 or 5 results, the pdf is displayed ok. Whats the problem? Performance? DomPDF? My Code? Thx very much!
[eluser]John_Betong[/eluser]
Hi andregufc, I would be tempted to place the following line of code immediately after your for/next loop and to test for 1, 2, 3, etc. Code: echo $sql; die; Another useful function to try is: Code: $this->db->last_query(); Another way of checking without having to edit your code and see the result is to have the following: (once again copied & posted immediately after your for/next loop) Code: $data['debug'] = $sql; AND in your view: Code: <head>
[eluser]andregufc[/eluser]
is not sql error. If the html document returned is big, dompdf dont generate de pdf. plz test whit big documents. plz help! thanks
[eluser]andregufc[/eluser]
im cant modify the php.ini because the server is online. dont have other solution? thanks
[eluser]John_Betong[/eluser]
[quote author="andregufc" date="1188843671"]im cant modify the php.ini because the server is online. dont have other solution? thanks[/quote] Hi AndreGgufc, Copy & paste this code (from my PHP help) into your your view and play about with it. Code: <?php Cheers, John_Betong
[eluser]andregufc[/eluser]
Result for 1 register: display_errors = 1 register_globals = 1 post_max_size = 8M post_max_size+1 = 9 post_max_size in bytes = 8388608 ========== 4 register: display_errors = 1 register_globals = 1 post_max_size = 8M post_max_size+1 = 9 post_max_size in bytes = 8388608 The genaration of the view is very fast, but the conversion to pdf is not fast, and not complete. If i select more than 4 registers, the conversion stop whitout errors. The SQL is ok, because the view is displayed, the error is in conversion to pdf in the logns views. thnks
[eluser]John_Betong[/eluser]
Hi AndreGgufc, Can you check the manual for ini_set(...). The function may get round your problem of "im cant modify the php.ini because the server is online." Cheers, John_Betong |
Welcome Guest, Not a member yet? Register Sign In |