Tags
Click Here to Download
PDF Manual de Referencia
If you have any changes for your pdf layout. for example : change text color, text align, font-size,font family. ect… see the below Manual Reference .
Goto your download folder –> open the pdf_query.php to change your style and queries,
These lines used to add a logo and select font size for heading.
- $pdf->Image(‘logo.png’,18,13,33);
- $pdf->SetFont(‘Arial’,’B’,14);
Select small font then heading for inner content.
- $pdf->SetFont(‘Arial’,’B’,7);
Write HTML to pdf file and output that file on the web browser.
- $pdf->Output();
pdf_query.php
This file contain PHP code to generate pdf file and show your submitted data on that file.
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont(‘Arial’, ”, 10);
// $pdf->Image(‘images/cr_thumb1.png’ , 30 ,8, 50 , 26,’png’); // add image
$pdf->Cell(18, 10, ”, 0);
$pdf->Cell(150, 10, ”, 0);
$pdf->SetFont(‘Arial’, ”, 9);
$pdf->Cell(50, 10, ‘Date: ‘.date(‘d-m-Y’).”, 0);
$pdf->Ln(10);
$pdf->SetFont(‘Arial’, ‘BU’, 10); //BU means bold and underline
$pdf->Cell(70, 8, ”, 0);
$pdf->SetTextColor(194,8,8);
$pdf->Cell(100, 8, ‘Libero Ram’, 0);
$pdf->SetTextColor(0,0,0); //black
$pdf->Ln(8);
//CONSULTA
$pdf->SetFont(‘Arial’, ‘B’, 8);
$pdf->Cell(90, 8, ‘username’, 1,0,’C’,0); //$pdf->Cell(width, height, text, border, position-next-cell, alignment);
$pdf->Cell(90, 8, ‘password’, 1,0,’C’,0); // C means center
$pdf->Ln(8);
$sql= mysql_query(“SELECT * FROM signuser”);
while($ham = mysql_fetch_array($sql)){
$username=$ham[‘username’];
$password=$ham[‘password’];
$pdf->SetFont(‘Arial’, ‘B’, 8);
$pdf->SetFont(‘Arial’, ‘B’, 8);
$pdf->Cell(90, 8, $username, 1,0,’C’,0);
$pdf->Cell(90, 8, $password, 1,0,’C’,0);
$pdf->Ln(8); //next line
}
$pdf->Cell(100, 8, ‘https://liberoram.wordpress.com ‘, 0);
$pdf->Output()
Click Here to Download