Search
 
SCRIPT & CODE EXAMPLE
 

PHP

How to add page heading in FPDF PHP

<?php
require('fpdf.php');
class PDF extends FPDF
{
/* Page header */
function Header()
{
    
    $this->SetFont('Arial','B',15);
    /* Move to the right */
    $this->Cell(60);
  
    $this->Cell(70,10,'Page Heading',1,0,'C');
    
}
/* Page footer */
function Footer()
{
    /* Position at 1.5 cm from bottom */
    $this->SetY(-15);
    /* Arial italic 8 */
    $this->SetFont('Arial','I',8);
    /* Page number */
    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
}
}

/* Instanciation of inherited class */
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',12);

$pdf->Output();
?>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel eloquent save method return value 
Php :: Laravel hasmany withSum() 
Php :: Never return type - PHP 8.1 
Php :: Read the index and hashid of the last block in the blockchain 
Php :: display woocommerce review using specific id 
Php :: php variable undefined inside function argument 
Php :: header redirect php 
Php :: Validating data received via the Web App php 
Php :: why are my css properties not being applied to php file 
Php :: change varchar limit in migration file. 
Php :: creating unique number adding zero 0 in number 
Php :: Laravel Cache store [none] is not defined. 
Php :: How to programmatically grab the product description in WooCommerce? 
Php :: php runden auf 2 stellen 
Php :: how to save snap in webcap in php codeigniter 
Php :: word limit in php 
Php :: wp wc trim zero 
Php :: laravel check if pagination is empty 
Php :: php convert datetime to timestamp 
Php :: rendomly mix array position in php 
Php :: Dynamic modal name appending in laravel 
Php :: rewrite rule wp blog to subdirectory 
Php :: run multiple php scripts parallel 
Php :: laravel required_if fileld has value 
Php :: Undefined offset: 0 at laravelframeworksrcIlluminateRoutingRouter.php 
Php :: dd function not laravel 
Php :: php hook function 
Php :: strtotime last day of month 
Php :: enfold remove debugging info for theme support 
Php :: how to check if a user sent you money in paypal in php 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =