Skip to content

Commit

Permalink
Margin for PDF output can now be defined as an object allowing differ…
Browse files Browse the repository at this point in the history
…ent margins to be applied to each edge of PDF - #113
  • Loading branch information
jonnnnyw committed Nov 15, 2016
1 parent c11e1b5 commit 0baec84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/JonnyW/PhantomJs/Http/PdfRequest.php
Expand Up @@ -52,7 +52,7 @@ class PdfRequest extends CaptureRequest
/**
* Margin
*
* @var string
* @var string|array
* @access protected
*/
protected $margin;
Expand Down Expand Up @@ -221,7 +221,7 @@ public function getOrientation()
* Set margin.
*
* @access public
* @param string $margin
* @param string|array $margin
* @return void
*/
public function setMargin($margin)
Expand All @@ -233,7 +233,7 @@ public function setMargin($margin)
* Get margin.
*
* @access public
* @return string
* @return string|array
*/
public function getMargin()
{
Expand Down
Expand Up @@ -5,7 +5,7 @@
paperHeight = '{{ input.getPaperHeight() }}',
paperFormat = '{{ input.getFormat() }}',
paperOrientation = '{{ input.getOrientation() }}',
paperMargin = '{{ input.getMargin() }}',
paperMargin = {{ input.getMargin()|json_encode(constant('JSON_FORCE_OBJECT')) }},
header = {{ input.getRepeatingHeader()|json_encode(constant('JSON_FORCE_OBJECT')) }},
footer = {{ input.getRepeatingFooter()|json_encode(constant('JSON_FORCE_OBJECT')) }};

Expand Down

0 comments on commit 0baec84

Please sign in to comment.