Это то, что у меня пока есть:
Код: Выделить всё
function buildBSIPDF($filename){
global $supplier;
$pdf = new FPDI();
$i = 1;
$pagecount = $pdf->setSourceFile($filename);
//create text to append
$sideline = "Some text here";
while($i setSourceFile($filename);
// import page 1
$tplIdx = $pdf->importPage($i);
//use the imported page and place it at point 0,0; calculate width and height
//automaticallay and ajust the page size to the size of the imported page
//$s = $pdf->getTemplatesize($tplidx);
$pdf->AddPage();
$pdf->useTemplate($tplIdx);
// now write some text above the imported page
$pdf->SetFont('Arial', '', '12');
$pdf->SetTextColor(0,0,0);
//set position in pdf document
$pdf->SetXY(20, 20);
//first parameter defines the line height
$pdf->RotatedText(5,250,$sideline,90);
$i++;
}
$pdf->Output($filename, 'F');
Подробнее здесь: https://stackoverflow.com/questions/130 ... pdi-in-php