phpdftk API Documentation

PageDecorator
in package

FinalYes

Holds the optional per-page render hooks registered on a {@see Pdf} document: header, footer, and watermark closures.

Each closure has the signature function(PageContext $ctx): void and is invoked once per page during a deferred render pass, after all flow content has been placed but before the PDF bytes are generated.

Table of Contents

Properties

$footer  : Closure|null
$header  : Closure|null
$watermark  : Closure|null

Methods

__construct()  : mixed
isEmpty()  : bool
withFooter()  : self
withHeader()  : self
withWatermark()  : self

Properties

Methods

__construct()

public __construct([Closure|null $header = null ][, Closure|null $footer = null ][, Closure|null $watermark = null ]) : mixed
Parameters
$header : Closure|null = null
$footer : Closure|null = null
$watermark : Closure|null = null

withFooter()

public withFooter(Closure|null $footer) : self
Parameters
$footer : Closure|null
Return values
self

withHeader()

public withHeader(Closure|null $header) : self
Parameters
$header : Closure|null
Return values
self

withWatermark()

public withWatermark(Closure|null $watermark) : self
Parameters
$watermark : Closure|null
Return values
self

        
On this page

Search results