-1
私はあまりにも多くのpdfファイルを持っており、私はpdfのverを変更することはできません。 PDFファイルを一緒に組み合わせる方法はありますか? は、私がこれを使用する:あなたの助けのためのpdfファイルをまとめて{pdf ver 1.7}
<?php
require_once('fpdf.php');
require_once('fpdi.php');
class ConcatPdf extends FPDI
{
public $files = array();
public function setFiles($files)
{
$this->files = $files;
}
public function concat()
{
foreach($this->files AS $file) {
$pageCount = $this->setSourceFile($file);
for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) {
$tplIdx = $this->ImportPage($pageNo);
$s = $this->getTemplatesize($tplIdx);
$this->AddPage($s['w'] > $s['h'] ? 'L' : 'P', array($s['w'], $s['h']));
$this->useTemplate($tplIdx);
}
}
}
}
$pdf = new ConcatPdf();
$pdf->setFiles(array("Boombastic-Box.pdf", "Fantastic-Speaker.pdf", "Noisy-Tube.pdf"));
$pdf->concat();
$pdf->Output('concat.pdf', 'I');
感謝を。
の下にこれを使用することができます見つけることができますPDFMergerスクリプト を使用することができますよろしいですか? pdf ver 1.7のこの作品ですか?私はそれを前に試しました。 – Amin
はいこれが動作します –
FPDFエラー:このドキュメント(test.pdf)は、FPDIに同梱されている無料のパーサーではサポートされていない圧縮技術を使用している可能性があります。 – Amin