i am using a pdf library using dompdf i have a problem |
[eluser]dinisptc[/eluser]
i am using a pdf library using dompdf i have a problem $this->load->library('pdf'); $this->pdf->load_view('onplans/list_my_projects_avatar',$Ddata); $this->pdf->render(); $this->pdf->stream("welcome.pdf"); its working well its creating the pdf file everything looks good the problem its that i want to save the file in the disk without opening the pdf file thanks
[eluser]vimala[/eluser]
[quote author="vimala" date="1370432199"]Please tell me about the ci instance[/quote]
[eluser]dinisptc[/eluser]
$this->load->library('pdf'); $this->pdf->load_view('onplans/list_my_projects_avatar',$Ddata); $this->pdf->render(); //$this->pdf->stream("BEMVINDO.pdf",array("Attachment" => false)); $this->pdf->stream("BEMVINDO.pdf",$this->pdf->output()); i am now using $this->pdf->output() and its not working keeps opening the pdf ,i just want to create it and save it to the disk https://github.com/chrisnharvey/CodeIgni...or-Library
[eluser]dinisptc[/eluser]
$this->load->library('pdf'); $this->pdf->load_view('onplans/list_my_projects_avatar',$Ddata); $this->pdf->render(); // $this->pdf->stream("BEMVINDO.pdf",array("compress" => true)); $filename="teste"; $report_config = $this->config->item('report'); $report_dir=$report_config['upload_path'].$this->projects_model->check_user_id().'/reportpdf/'; print_r($report_dir); if (!is_dir($report_dir)) { mkdir($report_dir,0777,true); } $pdfoutput = $this->pdf->output(); //$filename = DIR_BASIC.APARENCIA."/".DIR_DEFAULT_UPLOAD."/dompdf/$dir/$filename.pdf"; $filename ="$report_dir/$filename.pdf"; $fp = fopen($filename, "a"); fwrite($fp, $pdfoutput); fclose($fp);
[eluser]hebe_210[/eluser]
hi, I m not clear what platfrom you're in. I've ever worked on the same stuff in windows desktop.from my experience of pdf generating ,the following pages can be greatly helpful .check pdf creating guide in .NET this is c# solution, hope it helps. |
Welcome Guest, Not a member yet? Register Sign In |