Sunucumda, her sayfaya eklenmiş metne ihtiyaç duyulan bir pdfs bankam var. Dosyayı açmak ve açmak, metni her sayfaya eklemek, dosyayı kapatmak ve tarayıcıya sunmak için fpdf kullanıyorum. Ben bu yaptırabilirsin ben o zaman eklemek gerekir dakikadaMevcut pdf'yi php olarak değiştirmek için fpdf'yi kullanma
$pdf = new FPDI();
$pdf->setSourceFile($filename);
// import page 1
$tplIdx = $pdf->importPage(1);
//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
$pdf->useTemplate($tplIdx, 0, 0, 0, 0, true);
// now write some text above the imported page
$pdf->SetFont('Arial', '', '13');
$pdf->SetTextColor(0,0,0);
//set position in pdf document
$pdf->SetXY(20, 20);
//first parameter defines the line height
$pdf->Write(0, 'gift code');
//force the browser to download the output
$pdf->Output('gift_coupon_generated.pdf', 'D');
header("location: ".$filename);
bu sadece pdf üzerinde herhangi bir yere bazı metinleri koymak ve kaydetmek için çalışır ama hata
FPDF error: You have to add a page first!
olsun belgenin yerine sadece 1 değil, bunun nasıl emin her sayfaya metin aşağıdaki belgeleri
sadece Null kullanarak sadece $ x & $ y '$ outPdf-> useTemplate ($ outPdf-> importPage ($ i), null, null, 0, 0, true); Aksi takdirde Sayfaları A4'e keser. – juanmf