==>> ❇️ '.$chapter["mdfile"].' ...');
+ if (array_key_exists('header', $config)) {
+ $pdf->SetHTMLHeader(
+ '
+
+ ' . Arr::get($chapter, "frontmatter.title", $config["title"]) . '
+
'
+ );
+ }
+ $pdf->WriteHTML(
+ $chapter["html"]
+ );
+ }
+
$this->output->writeln('==>> Writing PDF To Disk ...');
$this->output->writeln('');
diff --git a/src/Commands/InitCommand.php b/src/Commands/InitCommand.php
index 11dcd49..ce252af 100644
--- a/src/Commands/InitCommand.php
+++ b/src/Commands/InitCommand.php
@@ -40,7 +40,7 @@ protected function configure()
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
* @throws \Mpdf\MpdfException
*/
- public function execute(InputInterface $input, OutputInterface $output)
+ public function execute(InputInterface $input, OutputInterface $output): int
{
$this->disk = new Filesystem();
$this->output = $output;
diff --git a/src/Commands/SampleCommand.php b/src/Commands/SampleCommand.php
index 91854df..fbbc08d 100644
--- a/src/Commands/SampleCommand.php
+++ b/src/Commands/SampleCommand.php
@@ -43,7 +43,7 @@ protected function configure()
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
* @throws \Mpdf\MpdfException
*/
- public function execute(InputInterface $input, OutputInterface $output)
+ public function execute(InputInterface $input, OutputInterface $output): int
{
$this->disk = new Filesystem();
diff --git a/src/Commands/SortContentCommand.php b/src/Commands/SortContentCommand.php
index 62f11af..c273e12 100644
--- a/src/Commands/SortContentCommand.php
+++ b/src/Commands/SortContentCommand.php
@@ -41,7 +41,7 @@ protected function configure()
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
* @throws \Mpdf\MpdfException
*/
- public function execute(InputInterface $input, OutputInterface $output)
+ public function execute(InputInterface $input, OutputInterface $output): int
{
$this->disk = new Filesystem();
diff --git a/stubs/ibis.php b/stubs/ibis.php
index a188a26..9cdda23 100644
--- a/stubs/ibis.php
+++ b/stubs/ibis.php
@@ -44,6 +44,7 @@
'cover' => [
'position' => 'position: absolute; left:0; right: 0; top: -.2; bottom: 0;',
'dimensions' => 'width: 210mm; height: 297mm; margin: 0;',
+ 'image' => 'cover.jpg',
],
/**
@@ -54,7 +55,7 @@
[80, 85],
[100, 103],
],
-
+
/**
* default commonmark
*/
@@ -65,4 +66,10 @@
*/
'sample_notice' => 'This is a sample from "Laravel Queues in Action" by Mohamed Said.
For more information, Click here.',
+
+ /**
+ * CSS inline style for the page header.
+ * If you want to skip header, comment the line
+ */
+ 'header' => 'font-style: italic; text-align: right; border-bottom: solid 1px #808080;',
];