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:
varun kewlani
2026-05-13 19:31:47 +05:30
parent a3316ff285
commit cbc7ae2b1f
8 changed files with 190 additions and 328 deletions

View File

@@ -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();