I have 2 in functions called print_person
and print_section
print_person
function generates a pdf file which is a report of an individuals qualifications.
print_section
generates a pdf file with the section details and the personnel list.
If possible, when generating the section report i want to generate each individuals report and attached it in the section report as a pdf attachment without having to save it to a file first.
I'm using TCPDF as a library in codeigniter to generate the reports.
//this below is inside the "print_section" report function to print each person
foreach ($personnel_lst as $key => $pers){
...
//printing person
...
//parameters = $id = id of the person, 'E'= output option for TCPDF output function.
$pers_file = $this->print_person($id, 'E');
$file = chunk_split($pers_file);
$pdf->Annotation(1, 1, 0, 0, '', array('Subtype'=>'FileAttachment', 'Name' => 'Paperclip', 'FS' => $pers_file ));
}//end for each