Welcome Guest, Not a member yet? Register   Sign In
i am using a pdf library using dompdf i have a problem
#1

[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
#2

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

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

[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
#5

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

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




Theme © iAndrew 2016 - Forum software by © MyBB