네. PDF를 병합했습니다. 얻으십시오 FPDF 그리고 FPDI 라이브러리를 사용하여 Code Igniter 타사 폴더에 넣습니다. 그런 다음 FPDFI 매뉴얼을 읽고 문서를 병합하는 문제 일뿐입니다. 이것을 사용하여 라이브러리를 설정하십시오
require_once("application/third_party/fpdf/fpdf.php");//http://www.fpdf.org/
require_once("application/third_party/fpdi/FPDI_Protection.php");//http://www.setasign.de/products/pdf-php-solutions/fpdi/
그런 다음이 코드 스 니펫은 어떻게 작동하는지에 대한 아이디어를 제공해야합니다. 참고 명확성을 위해 이것의 섹션을 편집했습니다. 이 예제는 PDF 파일을 스트리밍합니다. 다른 곳에서 파일을 쉽게 저장할 수 있습니다.
$files = array(<file full paths here>);
$pdf = new FPDI_Protection();
if ($data->password)
{
$pdf->setProtection(array(),$data->password);
}
for ($i = 0; $i < count($files); $i++ )
{
$pagecount = $pdf->setSourceFile($files[$i]);
for($j = 0; $j < $pagecount ; $j++)
{
$tplidx = $pdf->importPage(($j +1), '/MediaBox'); // template index.
$pdf->addPage('L','A4');// orientation can be P|L
$pdf->useTemplate($tplidx, 0, 0, 0, 0, TRUE);
}
unlink($files[$i]); // you may not want to unlink the files!
}
$dt = new DateTime(NULL, new DateTimeZone($data->user->timezone));
// set the metadata.
$pdf->SetAuthor($data->user->user_name);
$pdf->SetCreator('website name!');
$pdf->SetTitle('PDF, created: '.$dt->format(MYHMRS_DATETIME_FRIENDLY));
$pdf->SetSubject('PDF subject !');
$pdf->SetKeywords('website name!'.", keywords! ".$data->user->user_name);
$output = $pdf->Output('', 'S');
$name = "PDF".'-'.$dt->format('ymd').'.pdf';
$this->output
->set_header("Content-Disposition: filename=$name;")
->set_content_type('Application/pdf')
->set_output($output);
다른 사이트에서 PDF를 얻는 것에 관해서는 먼저이 작업을 수행 할 수 있는지 확인한 다음 컬을 사용하는 것이 중요합니다. (복사 URL). ~이있다 Codeigniter 라이브러리를 수행합니다, 또는 당신은 그것을 사용할 수 있습니다 PHP 라이브러리.