Overview

Namespaces

  • None
  • PHP
  • WkHtmlToPdf
    • Options

Traits

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

Trait GlobalOptionsTrait

General wkhtmltopdf options.

Direct Known Users

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

Collate when printing multiple copies (default true).

Collate when printing multiple copies (default true).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableCollate( )

Do not collate when printing multiple copies (default true).

Do not collate when printing multiple copies (default true).

Returns

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

Read and write cookies from and to the supplied cookie jar file.

Read and write cookies from and to the supplied cookie jar file.

Parameters

$path

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setCopies( integer $number = 1 )

Number of copies to print into the pdf file (default 1).

Number of copies to print into the pdf file (default 1).

Parameters

$number

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setDpi( integer $dpi )

Change the dpi explicitly (this has no effect on X11 based systems).

Change the dpi explicitly (this has no effect on X11 based systems).

Parameters

$dpi

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableGrayscale( )

PDF will be generated in grayscale.

PDF will be generated in grayscale.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableGrayscale( )

PDF will not be generated in grayscale.

PDF will not be generated in grayscale.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setImageDpi( integer $imageDpi = 600 )

When embedding images scale them down to this dpi (default 600).

When embedding images scale them down to this dpi (default 600).

Parameters

$imageDpi

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setImageQuality( integer $imageQuality = 94 )

When jpeg compressing images use this quality (default 94).

When jpeg compressing images use this quality (default 94).

Parameters

$imageQuality

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableLowQuality( )

Generates lower quality pdf/ps. Useful to shrink the result document space.

Generates lower quality pdf/ps. Useful to shrink the result document space.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableLowQuality( )

Disable lower quality pdf/ps.

Disable lower quality pdf/ps.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMarginBottom( string $marginBottom )

Set the page bottom margin.

Set the page bottom margin.

Parameters

$marginBottom

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMarginLeft( string $marginLeft )

Set the page left margin (default 10mm).

Set the page left margin (default 10mm).

Parameters

$marginLeft

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMarginRight( string $marginRight )

Set the page right margin (default 10mm).

Set the page right margin (default 10mm).

Parameters

$marginRight

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMarginTop( string $marginTop )

Set the page top margin.

Set the page top margin.

Parameters

$marginTop

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMargins( string $marginTop, string $marginRight, string $marginBottom, string $marginLeft )

Set all margins.

Set all margins.

Parameters

$marginTop
$marginRight
$marginBottom
$marginLeft

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setMarginsAll( type $margin )

Set all margins to same size.

Set all margins to same size.

Parameters

$margin

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setOrientation( string $orientation = 'Portrait' )

Set orientation to Landscape or Portrait (or P|L, default Portrait).

Set orientation to Landscape or Portrait (or P|L, default Portrait).

Parameters

$orientation

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setPageHeight( string $pageHeight )

Set page height.

Set page height.

Parameters

$pageHeight

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setPageWidth( string $pageWidth )

Set page width.

Set page width.

Parameters

$pageWidth

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setPageSize( string $pageSize = 'A4' )

Set paper size to: A4, Letter, etc. (default A4).

Set paper size to: A4, Letter, etc. (default A4).

Parameters

$pageSize

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enablePdfCompression( )

Use lossless compression on pdf objects.

Use lossless compression on pdf objects.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disablePdfCompression( )

Disable using of lossless compression on pdf objects.

Disable using of lossless compression on pdf objects.

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setTitle( string $title )

The title of the generated pdf file (The title of the first document is used if not specified).

The title of the generated pdf file (The title of the first document is used if not specified).

Parameters

$title

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# setDocumentTitle( string $title )

Alias of setTitle.

Alias of setTitle.

Parameters

$title

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# enableXserver( )

Use the X server (some plugins and other stuff might not work without X11).

Use the X server (some plugins and other stuff might not work without X11).

Returns

WkHtmlToPdf\WkHtmlToPdf
public WkHtmlToPdf\WkHtmlToPdf
# disableXserver( )

Do not use the X server (some plugins and other stuff might not work without X11).

Do not use the X server (some plugins and other stuff might not work without X11).

Returns

WkHtmlToPdf\WkHtmlToPdf
wkp2p API documentation generated by ApiGen