Skip to content

Commit

Permalink
setup page format and margins if not specified in html
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalpospiech committed Feb 13, 2019
1 parent 790d8c6 commit 7bbb63c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Html/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ public function parse()
->setDocument($this->document)
->setRoot(true)
->init();
$pageGroup->format = $this->document->getDefaultFormat();
$margins = $this->document->getDefaultMargins();
$pageGroup->marginLeft = $margins['left'];
$pageGroup->marginTop = $margins['top'];
$pageGroup->marginRight = $margins['right'];
$pageGroup->marginBottom = $margins['bottom'];
$pageGroup->orientation = $this->document->getDefaultOrientation();
$this->setGroupOptions($pageGroup, $domDocument);
$page = $this->document->addPage($pageGroup->format, $pageGroup->orientation);
Expand Down

0 comments on commit 7bbb63c

Please sign in to comment.