sarabitcom / fpdf-barcode
library to generate pdf document with barcode support
Installs: 187
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/sarabitcom/fpdf-barcode
This package is auto-updated.
Last update: 2025-12-24 20:17:57 UTC
README
library to generate pdf document with bar-code support
Create Object
$pdf = new \Sarabitcom\Fpdf\FpdfCode39('P', 'mm', 'A4');
Set Margins
$pdf->SetLeftMargin(68); $pdf->SetRightMargin(1); $pdf->SetTopMargin(90);
Add Page
$pdf->AddPage();
Set Headers (Optional)
$pdf->SetAuthor('You Name');
$pdf->SetCreator('Sarabit PDF Barcode');
$pdf->SetTitle('Document Title');
$pdf->SetSubject('Document Subject');
Add Barcode
$pdf->Code39(138, 160, "1234567890", 1, 10);
Set Image
$imagePath = "/home/user/yourimage.jpeg"; // Absolute Path $pdf->Image($imagePath, 0, 0, 210, 297);
Set Font
// Normal
$pdf->SetFont('Times', '', 12);
// Bold
$pdf->SetFont('Times', 'B', 11);
// Italic
$pdf->SetFont('Times', 'I', 11);
Make Cell
$pdf->Text(68, 164, "Your Text Here");
Output
$pdf->Output('file.pdf', 'I');