Sh3ll
OdayForums


Server : Apache
System : Linux profile 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 8.0.28
Disable Function : NONE
Directory :  /var/www/html/mmishra/erp-10-07-2018/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/html/mmishra/erp-10-07-2018/makepdf.php
<?php
//fpdf - pdf generator
//require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'controllers/erp_controller.php');
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'includes/fpdf.php');
	
class PDF extends FPDF {
    function Header() {
	    $this->Image('logo.png', 6, 8, 20);
        $this->SetFont('Helvetica','B', 15);
        $this->SetXY(10, 10);
        $this->Cell(0, 14, 'Indian Institute of Information Technology Allahabad', 0, 1, 'C');
        $this->SetFont('Helvetica', 'B', 10);
        $this->Cell(0, 0, 'Devghat, Jhalwa, Allahabad-211015', 0, 1, 'C');
		$this->Line(0, 30, 500, 30);
		$this->Ln(15);
    }

    function Footer() {
       	$this->SetY(-18);
       	$this->SetDrawColor(188, 188, 188);
       	$this->SetLineWidth(1);
       	$this->Line(startpoint, 45, endpoint-50, 45);

       	$this->SetXY(65, -15);
       	$this->SetFont('Helvetica', 'I', 8);
    	$this->Write(5, 'Please use this receipt for your education loan from any bank.');
    }
}

	$pdf = new PDF('P', 'mm', 'A4');

	$pdf->SetDisplayMode(real, 'default');
	$pdf->AddPage();
	$pdf->SetTitle('ERP PDF Generator');
	$pdf->SetAuthor('IIIT-A');

	//$pdf->SetFillColor(0, 0, 0);
	$pdf->SetFont('Helvetica', 'U', 12);
	$pdf->Cell(0, 0, 'Enrollment Receipt - 2018', 0, 1, 'C');
	$pdf->Ln(10);
	$pdf->SetFont('Times', '', 10);
	
	$pdf->Write(14, 'RollNo: ');
    $pdf->SetXY(35, 52);
    $pdf->Cell(65, 6, '123456789', 1, 0, 'L');
	$pdf->Write(10, 'Name: ');
    $pdf->SetXY(120, 52);
    $pdf->Cell(65, 6, 'Dr. M.K. Mishra', 1, 1, 'L');

	$pdf->Write(10, 'RollNo: ');
    $pdf->SetXY(35, 60);
    $pdf->Cell(65, 6, '123456789', 1, 0, 'L');
	$pdf->Write(10, 'Name: ');
    $pdf->SetXY(120, 60);
    $pdf->Cell(65, 6, 'Dr. M.K. Mishra', 1, 1, 'L');

	$pdf->Write(10, 'RollNo: ');
    $pdf->SetXY(35, 68);
    $pdf->Cell(65, 6, '123456789', 1, 0, 'L');
	$pdf->Write(10, 'Name: ');
    $pdf->SetXY(120, 68);
    $pdf->Cell(65, 6, 'Dr. M.K. Mishra', 1, 1, 'L');

	$pdf->Write(10, 'RollNo: ');
    $pdf->SetXY(35, 76);
    $pdf->Cell(65, 6, '123456789', 1, 0, 'L');
	$pdf->Write(10, 'Name: ');
    $pdf->SetXY(120, 76);
    $pdf->Cell(65, 6, 'Dr. M.K. Mishra', 1, 1, 'L');

	$pdf->Write(10, 'RollNo: ');
    $pdf->SetXY(35, 84);
    $pdf->Cell(65, 6, '123456789', 1, 0, 'L');
	$pdf->Write(10, 'Name: ');
    $pdf->SetXY(120, 84);
    $pdf->Cell(65, 6, 'Dr. M.K. Mishra', 1, 1, 'L');

	//$pdf->MultiCell(10, 0, "Prints a character string. The origin is on the left of the first character, on the baseline. This method allows to place a string precisely on the page, but it is usually easier to use Cell(), MultiCell() or Write() which are the standard methods to print text.", 1, 'J');





	$pdf->Line(0, 260, 500, 260);
    $pdf->SetXY(5, 252);
    $pdf->Cell(0, 10, '[ Seal & Signatures ]', 0, 1, 'C');

	$pdf->SetFont('Helvetica', 'U', 10);
    $pdf->SetXY(20, 266);
	$pdf->Write(9, '(Student)');
    $pdf->SetXY(90, 266);
	$pdf->Write(9, '(Parent/Guardian)');
    $pdf->SetXY(165, 266);
	$pdf->Write(9, '(AAA Official)');
	$pdf->Line(0, 275, 500, 275);


	$filename = "/var/www/html/erp/uploads/test.pdf";
	$pdf->Output($filename, 'F');

	
	
	//$str = "<object data='/var/www/html/erp/uploads/test.pdf' type='application/pdf' width='100%' height='100%'></object>";
	$str = "<embed src='/var/www/html/erp/uploads/test.pdf' type='application/pdf' width='100%' height='100%'>";

	echo $str;
	
	//$pdf->Output('receipt.pdf', 'D');

?>

ZeroDay Forums Mini