Browse Source

Get indentation and font family

dev
Alex Puiu 2 years ago
parent
commit
86570db9c7
  1. 10
      app/Console/Kernel.php
  2. 4
      app/Ingest/PDFConvertor.php

10
app/Console/Kernel.php

@ -14,11 +14,11 @@ class Kernel extends ConsoleKernel
*
* @var array
*/
protected $commands = [
DeployWorker::class,
TestMachine::class
//
];
// protected $commands = [
// DeployWorker::class,
// TestMachine::class
// //
// ];
/**
* Define the application's command schedule.

4
app/Ingest/PDFConvertor.php

@ -61,7 +61,7 @@ class PDFConvertor extends AbstractConvertor
foreach ($page as $p) {
if ($p->getName() === 'fontspec') {
$fonts[(int) $p['id']]['family'] = (string) $p['family'];
$fonts[(int) $p['id']]['family'] = (string) substr($p['family'], strpos($p['family'], '+') + 1);
$fonts[(int) $p['id']]['size'] = (string) $p['size'];
$fonts[(int) $p['id']]['color'] = (string) $p['color'];
}
@ -214,7 +214,7 @@ class PDFConvertor extends AbstractConvertor
$style = $style . "height: " . $p['height'] . "px;";
if($firstOfText)
$style = $style . "padding-left: " . (intval($p['left']) - 90) . "px;";
// $style = $style . "font-size: $font_size" . "px;";
$style = $style . "font-size: $font_size" . "px;";
if ($p->i) {
$content = '<i>' . $p->i . '</i>';

Loading…
Cancel
Save