CodeIgniter Forums
i am using a pdf library using dompdf i have a problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: i am using a pdf library using dompdf i have a problem (/showthread.php?tid=58345)



i am using a pdf library using dompdf i have a problem - El Forum - 06-05-2013

[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


i am using a pdf library using dompdf i have a problem - El Forum - 06-05-2013

[eluser]vimala[/eluser]
Please tell me about the ci instance


i am using a pdf library using dompdf i have a problem - El Forum - 06-05-2013

[eluser]vimala[/eluser]
[quote author="vimala" date="1370432199"]Please tell me about the ci instance[/quote]


i am using a pdf library using dompdf i have a problem - El Forum - 06-05-2013

[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/CodeIgniter-PDF-Generator-Library


i am using a pdf library using dompdf i have a problem - El Forum - 06-05-2013

[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);


i am using a pdf library using dompdf i have a problem - El Forum - 07-18-2013

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