Fixed: Changed the preview image, change class names, and removed unnecessary function calls
Co-authored-by: Name <sumit201@webkul.in>
This commit is contained in:
@@ -38,7 +38,6 @@ class PDFGeneratorCore extends TCPDF
|
||||
public $pagination;
|
||||
public $content;
|
||||
public $font;
|
||||
protected $force_minimal_margins = false;
|
||||
|
||||
public $font_by_lang = array(
|
||||
'ja' => 'cid0jp',
|
||||
@@ -208,10 +207,6 @@ class PDFGeneratorCore extends TCPDF
|
||||
return $this->output($filename, $output);
|
||||
}
|
||||
|
||||
public function setMinimalMargins($minimal = true)
|
||||
{
|
||||
$this->force_minimal_margins = $minimal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a PDF page
|
||||
@@ -220,12 +215,8 @@ class PDFGeneratorCore extends TCPDF
|
||||
{
|
||||
$this->SetHeaderMargin(5);
|
||||
$this->SetFooterMargin(21);
|
||||
if ($this->force_minimal_margins) {
|
||||
$this->SetAutoPageBreak(true, 25);
|
||||
$this->setPrintHeader(false);
|
||||
$this->setMargins(10, 10, 10); // Reclaim the 40mm space
|
||||
} else {
|
||||
$this->setPrintHeader(true);
|
||||
$this->setMargins(10, 10, 10);
|
||||
if(isset($this->header) && !empty($this->header)) {
|
||||
$this->setMargins(10, 40, 10);
|
||||
}
|
||||
$this->AddPage();
|
||||
|
||||
Reference in New Issue
Block a user