Overview

Namespaces

  • None
  • PHP
  • WkHtmlToPdf
    • Options

Traits

  • GlobalOptionsTrait
  • HeaderFooterOptionsTrait
  • OutlineOptionsTrait
  • PageOptionsTrait
  • TocOptionsTrait
  • Overview
  • Namespace
  • Class
  • Tree

Trait PageOptionsTrait

Page options trait.

Direct Known Users

WkHtmlToPdf\WkHtmlToPdf
Namespace: WkHtmlToPdf\Options
Author: ivanpepelko
Located at WkHtmlToPdf/Options/PageOptionsTrait.php
Methods summary
public WkHtmlToPdf\WkHtmlToPdf
# enableJavascriptDebugging( )

Show javascript debugging output (only when constructor param $debug == true).

Show javascript debugging output (only when constructor param $debug == true).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableJavascriptDebugging( )

Do not show javascript debugging output (only when constructor param $debug == true).

Do not show javascript debugging output (only when constructor param $debug == true).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableBackground( )

Do print background (default).

Do print background (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableBackground( )

Do not print background.

Do not print background.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setCacheDir( string $path )

Set web cache directory.

Set web cache directory.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setCheckboxCheckedSvg( string $path )

Use this SVG file when rendering checked checkboxes.

Use this SVG file when rendering checked checkboxes.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setCheckboxUncheckedSvg( string $path )

Use this SVG file when rendering unchecked checkboxes.

Use this SVG file when rendering unchecked checkboxes.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setRadiobuttonCheckedSvg( string $path )

Use this SVG file when rendering checked radiobuttons.

Use this SVG file when rendering checked radiobuttons.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setRadiobuttonUncheckedSvg( string $path )

Use this SVG file when rendering unchecked radiobuttons.

Use this SVG file when rendering unchecked radiobuttons.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addCookie( string $name, string $value )

Set an additional cookie.

Set an additional cookie.

Parameters

$name
$value

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addCookies( array $cookies )

Set additional cookies.

Set additional cookies.

Parameters

$cookies

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addCustomHttpHeader( string $name, string $value )

Set an additional HTTP header.

Set an additional HTTP header.

Parameters

$name
$value

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addCustomHttpHeaders( array $headers )

Set additional HTTP headers.

Set additional HTTP headers.

Parameters

$headers

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableCustomHttpHeaderPropagination( )

Add HTTP headers specified by addCustomHeader() for each resource request.

Add HTTP headers specified by addCustomHeader() for each resource request.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableCustomHttpHeaderPropagination( )

Do not add HTTP headers specified by addCustomHeader() for each resource request.

Do not add HTTP headers specified by addCustomHeader() for each resource request.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addDefaultHeader( )

Add a default header, with the name of the page to the left, and the page number to the right, this is short for: setHeaderLeft('[webpage]'), setHeaderRight('[page]/[toPage]'), setMarginTop('2cm'), enableHeaderLine().

Add a default header, with the name of the page to the left, and the page number to the right, this is short for: setHeaderLeft('[webpage]'), setHeaderRight('[page]/[toPage]'), setMarginTop('2cm'), enableHeaderLine().

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setEncoding( string $encoding )

Set the default text encoding, for input.

Set the default text encoding, for input.

Parameters

$encoding

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableExternalLinks( )

Do not make links to remote web pages.

Do not make links to remote web pages.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableExternalLinks( )

Make links to remote web pages (default).

Make links to remote web pages (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableForms( )

Do not turn HTML form fields into pdf form fields (default).

Do not turn HTML form fields into pdf form fields (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableForms( )

Turn HTML form fields into pdf form fields.

Turn HTML form fields into pdf form fields.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableImages( )

Do load or print images (default).

Do load or print images (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableImages( )

Do not load or print images.

Do not load or print images.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableInternalLinks( )

Do not make local links.

Do not make local links.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableInternalLinks( )

Make local links (default).

Make local links (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableJavascript( )

Do not allow web pages to run javascript.

Do not allow web pages to run javascript.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableJavascript( )

Do allow web pages to run javascript (default).

Do allow web pages to run javascript (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setJavascriptDelay( integer $msec = 200 )

Wait some milliseconds for javascript finish (default 200).

Wait some milliseconds for javascript finish (default 200).

Parameters

$msec

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disablePlugins( )

Disable installed plugins (default).

Disable installed plugins (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enablePlugins( )

Enable installed plugins (plugins will likely not work).

Enable installed plugins (plugins will likely not work).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableTocBackLinks( )

Do not link from section header to toc (default).

Do not link from section header to toc (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableTocBackLinks( )

Link from section header to toc.

Link from section header to toc.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableSmartShrinking( )

Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant.

Disable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableSmartShrinking( )

Enable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant (default).

Enable the intelligent shrinking strategy used by WebKit that makes the pixel/dpi ratio none constant (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addAllowedPath( string $path )

Allow the file or files from the specified folder to be loaded.

Allow the file or files from the specified folder to be loaded.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addAllowedPaths( array $paths )

Allow the file or files from the specified folders to be loaded.

Allow the file or files from the specified folders to be loaded.

Parameters

$paths

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableLocalFileAccess( )

Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with allow().

Do not allowed conversion of a local file to read in other local files, unless explicitly allowed with allow().

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableLocalFileAccess( )

Allowed conversion of a local file to read in other local files. (default).

Allowed conversion of a local file to read in other local files. (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addScript( string $path )

Run this additional javascript after the page is done loading.

Run this additional javascript after the page is done loading.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addScripts( array $paths )

Run this additional javascripts after the page is done loading.

Run this additional javascripts after the page is done loading.

Parameters

$paths

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# keepRelativeLinks( )

Keep relative external links as relative external links.

Keep relative external links as relative external links.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# resolveRelativeLinks( )

Resolve relative external links into absolute links (default).

Resolve relative external links into absolute links (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setLoadErrorHandling( string $handler )

Specify how to handle pages that fail to load: abort, ignore or skip (default abort).

Specify how to handle pages that fail to load: abort, ignore or skip (default abort).

Parameters

$handler

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setLoadMediaErrorHandling( string $handler )

Specify how to handle media files that fail to load: abort, ignore or skip (default ignore).

Specify how to handle media files that fail to load: abort, ignore or skip (default ignore).

Parameters

$handler

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMinimumFontSize( integer $size )

Minimum font size.

Minimum font size.

Parameters

$size

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setPageOffset( integer $offset = 0 )

Set the starting page number (default 0).

Set the starting page number (default 0).

Parameters

$offset

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enablePrintMediaType( )

Use print media-type instead of screen.

Use print media-type instead of screen.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disablePrintMediaType( )

Do not use print media-type instead of screen (default).

Do not use print media-type instead of screen (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setViewportSize( string $size )

Set viewport size if you have custom scrollbars or css attribute overflow to emulate window size.

Set viewport size if you have custom scrollbars or css attribute overflow to emulate window size.

Parameters

$size
hxw, in pixels

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setZoom( float $zoom = 1.0 )

Use this zoom factor (default 1).

Use this zoom factor (default 1).

Parameters

$zoom

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableSlowScripts( )

Do not Stop slow running javascripts.

Do not Stop slow running javascripts.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableSlowScripts( )

Stop slow running javascripts (default).

Stop slow running javascripts (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addHttpPostField( string $name, string $value )

Add an additional post field.

Add an additional post field.

Parameters

$name
$value

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addHttpPostFields( array $fields )

Add an additional post fields.

Add an additional post fields.

Parameters

$fields

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addHttpPostFile( string $name, string $path )

Add an additional post file.

Add an additional post file.

Parameters

$name
$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# addHttpPostFiles( array $files )

Add an additional post files.

Add an additional post files.

Parameters

$files

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setUserStyleSheet( string $url )

Specify a user style sheet, to load with every page.

Specify a user style sheet, to load with every page.

Parameters

$url

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setHttpAuthUsername( string $username )

HTTP Authentication username.

HTTP Authentication username.

Parameters

$username

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setHttpAuthPassword( string $password )

HTTP Authentication password.

HTTP Authentication password.

Parameters

$password

Returns

WkHtmlToPdf\WkHtmlToPdf
public Wkh2ps
# setProxy( string $proxy )

Use a proxy.

Use a proxy.

Parameters

$proxy

Returns

Wkh2ps
public WkHtmlToPdf\WkHtmlToPdf
# waitWindowStatus( string $windowStatus )

Wait until window.status is equal to this string before rendering page.

Wait until window.status is equal to this string before rendering page.

Parameters

$windowStatus

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setBypassProxy( string $value )

Bypass proxy for host (repeatable).

Bypass proxy for host (repeatable).

Parameters

$value

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# excludeFromOutline( )

Do not include the page in the table of contents and outlines.

Do not include the page in the table of contents and outlines.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# includeInOutline( )

Include the page in the table of contents and outlines (default).

Include the page in the table of contents and outlines (default).

Returns

WkHtmlToPdf\WkHtmlToPdf
wkp2p API documentation generated by ApiGen