How to work with PDF in Codeigniter?

Asked

Viewed 1,798 times

-3

function cadastra_pesquisa() {
    $this->load->library('form_validation');
    $this->form_validation->set_rules('d_c_p_p', 'Domínio do conteúdo por parte do palestrante', 'required');
    $this->form_validation->set_rules('i_c_b', 'Instalações e coffee break', 'required');
    $this->form_validation->set_rules('h_p_c_g', 'Habilidade do palestrante na condução do grupo', 'required');
    $this->form_validation->set_rules('a_g_p', 'Avaliação Geral da Palestra', 'required');
    $this->form_validation->set_rules('c_a', 'Conteúdo Apresentado', 'required');
    if ($this->form_validation->run() == FALSE) {
        $data['info_sis'] = $this->db->get('info_sismarket')->result();
        $this->load->view('header_html');
        $this->load->view('header_view');
        $this->load->view('pesquisa/pesquisa_satisfacao_erro_view');
        $this->load->view('footer_view', $data);
        $this->load->view('footer_html');
    } else {
        $pesquisa['d_c_p_p'] = $this->input->post('d_c_p_p');
        $pesquisa['i_c_b'] = $this->input->post('i_c_b');
        $pesquisa['h_p_c_g'] = $this->input->post('h_p_c_g');
        $pesquisa['a_g_p'] = $this->input->post('a_g_p');
        $pesquisa['c_a'] = $this->input->post('c_a');
        $pesquisa['s_c'] = $this->input->post('s_c');

        $this->load->model('usuario_model');
        $this->usuario_model->GravaPesquisa($pesquisa);

        $this->load->view('header_html');
        $this->load->view('header_view');
        $this->load->view('pesquisa/pesquisa_satisfacao_ok_view');
        $this->load->view('footer_view');
        $this->load->view('footer_html');
    }
}
  • 1

    has any specific problem you are encountering? In the current form, the question is difficult to answer.

  • Hello bigown! Need to generate a report with information coming from the bank.

  • You need to give more details, what you’ve done, where the problem is. There’s no way people can give a real answer know better what you’re trying to do.

  • Please edit the question by putting more information, where you are in solving the problem and where you need to get.

  • Ok! @bigown, I will try to explain my question better, so that you can help me! Thanks!

3 answers

0

  • 1

    Links alone can get lost in time and we need lasting answers here. It would be better to expect him to give more details to give relevant information that can be found here by other developers.

0


Face you need to basically make a query in the database, assemble an HTML with the result of the query and then use DOMPDF to render the HTML.

Try using tables and avoid using CSS as DOMPDF has some limitations.

I hope I’ve helped.

0

If Voce is going to use the PDF skirt only with tables (as I had to use) I suggest taking a look at Datatables with the Tabletools plugin

Browser other questions tagged

You are not signed in. Login or sign up in order to post.