PHP 클래스 CakePdf\Pdf\CakePdf

파일 보기 프로젝트 열기: ceeram/cakepdf 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_allow mixed false: none true: all array: List of permissions that are allowed
$_availablePermissions array Available permissions
$_cache string | boolean Cache config name, if set to false cache is disabled
$_cryptoClass CakePdf\Pdf\Crypto\AbstractPdfCrypto Instance of PdfCrypto class
$_delay integer Javascript delay before rendering document in milliseconds
$_encoding string Encoding
$_engineClass CakePdf\Pdf\Engine\AbstractPdfEngine Instance of PdfEngine class
$_footer string Footer HTML
$_header string Header HTML
$_helpers array Helpers to be used in the render
$_html string Html to be rendered
$_layout string Layout for the View
$_layoutPath string Path to the layout - defaults to 'pdf'
$_marginBottom number Bottom margin in mm
$_marginLeft number Left margin in mm
$_marginRight number Right margin in mm
$_marginTop number Top margin in mm
$_orientation string Orientation of the pdf
$_ownerPassword boolean Owner password, used with crypto
$_pageSize string Page size of the pdf
$_protect boolean Flag that tells if we need to pass it through crypto
$_template string Template for the view
$_templatePath string Path to the template - defaults to 'Pdf'
$_theme array Theme for the View
$_title string Title of the document
$_userPassword boolean User password, used with crypto
$_viewRender string View for render
$_viewVars array Vars to sent to render
$_windowStatus string Window status required before rendering document

공개 메소드들

메소드 설명
__construct ( array $config = [] ) Constructor
cache ( null | boolean | string $cache = null ) : mixed Get/Set caching.
crypto ( string $name = null ) : AbstractPdfCrypto Load PdfCrypto
delay ( null | integer $delay = null ) : mixed Get/Set javascript delay.
encoding ( null | string $encoding = null ) : mixed Get/Set Encoding.
engine ( string $name = null ) : CakePdf\Pdf\Engine\AbstractPdfEngine Load PdfEngine
footer ( null | string $left = null, null | string $center = null, null | string $right = null ) : mixed Get/Set footer HTML.
header ( null | string $left = null, null | string $center = null, null | string $right = null ) : mixed Get/Set header HTML.
helpers ( array $helpers = null ) : mixed Helpers to be used in render
html ( null | string $html = null ) : mixed Get/Set Html.
layoutPath ( mixed $layoutPath = false ) : mixed Layout path
margin ( null | string | array $bottom = null, null | string $left = null, null | string $right = null, null | string $top = null ) : mixed Get/Set page margins.
marginBottom ( null | string $margin = null ) : mixed Get/Set bottom margin.
marginLeft ( null | string $margin = null ) : mixed Get/Set left margin.
marginRight ( null | string $margin = null ) : mixed Get/Set right margin.
marginTop ( null | string $margin = null ) : mixed Get/Set top margin.
orientation ( null | string $orientation = null ) : mixed Get/Set Orientation.
output ( null | string $html = null ) : string Create pdf content from html. Can be used to write to file or with PdfView to display
ownerPassword ( null | string $password = null ) : mixed Get/Set ownerPassword.
pageSize ( null | string $pageSize = null ) : mixed Get/Set Page size.
permissions ( null | boolean | array $permissions = null ) : mixed Get/Set permissions.
protect ( null | boolean $protect = null ) : mixed Get/Set protection.
template ( mixed $template = false, mixed $layout = null ) : mixed Template and layout
templatePath ( mixed $templatePath = false ) : mixed Template path
theme ( string $theme = null ) : mixed Theme to use when rendering
title ( null | string $title = null ) : mixed Get/Set document title.
userPassword ( null | string $password = null ) : mixed Get/Set userPassword
viewRender ( string $viewClass = null ) : mixed View class for render
viewVars ( array $viewVars = null ) : mixed Variables to be set on render
windowStatus ( null | string $status = null ) : mixed Get/Set the required window status for rendering Waits until the status is equal to the string before rendering the pdf
write ( string $destination, boolean $create = true, string $html = null ) : boolean Writes output to file

보호된 메소드들

메소드 설명
_render ( ) : array Build and set all the view properties needed to render the layout and template.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( array $config = [] )
$config array Pdf configs to use

_render() 보호된 메소드

Build and set all the view properties needed to render the layout and template.
protected _render ( ) : array
리턴 array The rendered template wrapped in layout.

cache() 공개 메소드

Get/Set caching.
public cache ( null | boolean | string $cache = null ) : mixed
$cache null | boolean | string Cache config name to use, If true is passed, 'cake_pdf' will be used.
리턴 mixed

crypto() 공개 메소드

Load PdfCrypto
public crypto ( string $name = null ) : AbstractPdfCrypto
$name string Classname of crypto engine without `Crypto` suffix. For example `CakePdf.Pdftk`
리턴 CakePdf\Pdf\Crypto\AbstractPdfCrypto

delay() 공개 메소드

Get/Set javascript delay.
public delay ( null | integer $delay = null ) : mixed
$delay null | integer delay to set in milliseconds
리턴 mixed

encoding() 공개 메소드

Get/Set Encoding.
public encoding ( null | string $encoding = null ) : mixed
$encoding null | string encoding to set
리턴 mixed

engine() 공개 메소드

Load PdfEngine
public engine ( string $name = null ) : CakePdf\Pdf\Engine\AbstractPdfEngine
$name string Classname of pdf engine without `Engine` suffix. For example `CakePdf.DomPdf`
리턴 CakePdf\Pdf\Engine\AbstractPdfEngine

header() 공개 메소드

Get/Set header HTML.
public header ( null | string $left = null, null | string $center = null, null | string $right = null ) : mixed
$left null | string left side header
$center null | string center header
$right null | string right side header
리턴 mixed

helpers() 공개 메소드

Helpers to be used in render
public helpers ( array $helpers = null ) : mixed
$helpers array helpers to use
리턴 mixed

html() 공개 메소드

Get/Set Html.
public html ( null | string $html = null ) : mixed
$html null | string Html to set
리턴 mixed

layoutPath() 공개 메소드

Layout path
public layoutPath ( mixed $layoutPath = false ) : mixed
$layoutPath mixed The path of the layout file to use
리턴 mixed

margin() 공개 메소드

Several options are available Array format ------------ First param can be an array with the following options: - bottom - left - right - top Set margin for all borders -------------------------- $bottom is set to a string Leave all other parameters empty Set margin for horizontal and vertical -------------------------------------- $bottom value will be set to bottom and top $left value will be set to left and right
public margin ( null | string | array $bottom = null, null | string $left = null, null | string $right = null, null | string $top = null ) : mixed
$bottom null | string | array bottom margin, or array of margins
$left null | string left margin
$right null | string right margin
$top null | string top margin
리턴 mixed

marginBottom() 공개 메소드

Get/Set bottom margin.
public marginBottom ( null | string $margin = null ) : mixed
$margin null | string margin to set
리턴 mixed

marginLeft() 공개 메소드

Get/Set left margin.
public marginLeft ( null | string $margin = null ) : mixed
$margin null | string margin to set
리턴 mixed

marginRight() 공개 메소드

Get/Set right margin.
public marginRight ( null | string $margin = null ) : mixed
$margin null | string margin to set
리턴 mixed

marginTop() 공개 메소드

Get/Set top margin.
public marginTop ( null | string $margin = null ) : mixed
$margin null | string margin to set
리턴 mixed

orientation() 공개 메소드

Get/Set Orientation.
public orientation ( null | string $orientation = null ) : mixed
$orientation null | string orientation to set
리턴 mixed

output() 공개 메소드

Create pdf content from html. Can be used to write to file or with PdfView to display
public output ( null | string $html = null ) : string
$html null | string Html content to render. If omitted, the template will be rendered with viewVars and layout that have been set.
리턴 string

ownerPassword() 공개 메소드

The owner password is used to control who can modify, print, manage the PDF document.
public ownerPassword ( null | string $password = null ) : mixed
$password null | string password to set
리턴 mixed

pageSize() 공개 메소드

Get/Set Page size.
public pageSize ( null | string $pageSize = null ) : mixed
$pageSize null | string Page size to set
리턴 mixed

permissions() 공개 메소드

all: allow all permissions none: allow no permissions array: list of permissions that are allowed
public permissions ( null | boolean | array $permissions = null ) : mixed
$permissions null | boolean | array Permissions to set
리턴 mixed

protect() 공개 메소드

Get/Set protection.
public protect ( null | boolean $protect = null ) : mixed
$protect null | boolean True or false
리턴 mixed

template() 공개 메소드

Template and layout
public template ( mixed $template = false, mixed $layout = null ) : mixed
$template mixed Template name or null to not use
$layout mixed Layout name or null to not use
리턴 mixed

templatePath() 공개 메소드

Template path
public templatePath ( mixed $templatePath = false ) : mixed
$templatePath mixed The path of the template to use
리턴 mixed

theme() 공개 메소드

Theme to use when rendering
public theme ( string $theme = null ) : mixed
$theme string theme to use
리턴 mixed

title() 공개 메소드

Get/Set document title.
public title ( null | string $title = null ) : mixed
$title null | string title to set
리턴 mixed

userPassword() 공개 메소드

The user password is used to control who can open the PDF document.
public userPassword ( null | string $password = null ) : mixed
$password null | string password to set
리턴 mixed

viewRender() 공개 메소드

View class for render
public viewRender ( string $viewClass = null ) : mixed
$viewClass string name of the view class to use
리턴 mixed

viewVars() 공개 메소드

Variables to be set on render
public viewVars ( array $viewVars = null ) : mixed
$viewVars array view variables to set
리턴 mixed

windowStatus() 공개 메소드

Get/Set the required window status for rendering Waits until the status is equal to the string before rendering the pdf
public windowStatus ( null | string $status = null ) : mixed
$status null | string status to set as string
리턴 mixed

write() 공개 메소드

Writes output to file
public write ( string $destination, boolean $create = true, string $html = null ) : boolean
$destination string Absolute file path to write to
$create boolean Create file if it does not exist (if true)
$html string Html to write
리턴 boolean

프로퍼티 상세

$_allow 보호되어 있는 프로퍼티

false: none true: all array: List of permissions that are allowed
protected mixed $_allow
리턴 mixed

$_availablePermissions 보호되어 있는 프로퍼티

Available permissions
protected array $_availablePermissions
리턴 array

$_cache 보호되어 있는 프로퍼티

Cache config name, if set to false cache is disabled
protected string|bool $_cache
리턴 string | boolean

$_cryptoClass 보호되어 있는 프로퍼티

Instance of PdfCrypto class
protected AbstractPdfCrypto,CakePdf\Pdf\Crypto $_cryptoClass
리턴 CakePdf\Pdf\Crypto\AbstractPdfCrypto

$_delay 보호되어 있는 프로퍼티

Javascript delay before rendering document in milliseconds
protected int $_delay
리턴 integer

$_encoding 보호되어 있는 프로퍼티

Encoding
protected string $_encoding
리턴 string

$_engineClass 보호되어 있는 프로퍼티

Instance of PdfEngine class
protected AbstractPdfEngine,CakePdf\Pdf\Engine $_engineClass
리턴 CakePdf\Pdf\Engine\AbstractPdfEngine

$_header 보호되어 있는 프로퍼티

Header HTML
protected string $_header
리턴 string

$_helpers 보호되어 있는 프로퍼티

Helpers to be used in the render
protected array $_helpers
리턴 array

$_html 보호되어 있는 프로퍼티

Html to be rendered
protected string $_html
리턴 string

$_layout 보호되어 있는 프로퍼티

Layout for the View
protected string $_layout
리턴 string

$_layoutPath 보호되어 있는 프로퍼티

Path to the layout - defaults to 'pdf'
protected string $_layoutPath
리턴 string

$_marginBottom 보호되어 있는 프로퍼티

Bottom margin in mm
protected number $_marginBottom
리턴 number

$_marginLeft 보호되어 있는 프로퍼티

Left margin in mm
protected number $_marginLeft
리턴 number

$_marginRight 보호되어 있는 프로퍼티

Right margin in mm
protected number $_marginRight
리턴 number

$_marginTop 보호되어 있는 프로퍼티

Top margin in mm
protected number $_marginTop
리턴 number

$_orientation 보호되어 있는 프로퍼티

Orientation of the pdf
protected string $_orientation
리턴 string

$_ownerPassword 보호되어 있는 프로퍼티

Owner password, used with crypto
protected bool $_ownerPassword
리턴 boolean

$_pageSize 보호되어 있는 프로퍼티

Page size of the pdf
protected string $_pageSize
리턴 string

$_protect 보호되어 있는 프로퍼티

Flag that tells if we need to pass it through crypto
protected bool $_protect
리턴 boolean

$_template 보호되어 있는 프로퍼티

Template for the view
protected string $_template
리턴 string

$_templatePath 보호되어 있는 프로퍼티

Path to the template - defaults to 'Pdf'
protected string $_templatePath
리턴 string

$_theme 보호되어 있는 프로퍼티

Theme for the View
protected array $_theme
리턴 array

$_title 보호되어 있는 프로퍼티

Title of the document
protected string $_title
리턴 string

$_userPassword 보호되어 있는 프로퍼티

User password, used with crypto
protected bool $_userPassword
리턴 boolean

$_viewRender 보호되어 있는 프로퍼티

View for render
protected string $_viewRender
리턴 string

$_viewVars 보호되어 있는 프로퍼티

Vars to sent to render
protected array $_viewVars
리턴 array

$_windowStatus 보호되어 있는 프로퍼티

Window status required before rendering document
protected string $_windowStatus
리턴 string