class pdf_crabe extends pdf_azur (View source)

pdf_crabe class

Class to generate PDF with template Crabe

Properties

$error from DocModel
$db from pdf_azur
$name from pdf_azur
$description from pdf_azur
$type from pdf_azur
$phpmin from pdf_azur
$version from pdf_azur
$page_largeur from pdf_azur
$page_hauteur from pdf_azur
$format from pdf_azur
$marge_gauche from pdf_azur
$marge_droite from pdf_azur
$marge_haute from pdf_azur
$marge_basse from pdf_azur
$emetteur from pdf_azur
protected $watermark_text from pdf_azur
protected $modulepart from pdf_azur
protected $const_prefix from pdf_azur

Methods

static array
getModelsList(DoliDB $db, integer $maxfilenamelength, string $type = '')

Return list of active generation models

from DocModel
__construct(DoliDB $db)

Constructor

int
write_file(Object $object, Translate $outputlangs, string $srctemplatepath = '', int $hidedetails, int $hidedesc, int $hideref)

Function to build pdf onto disk

from pdf_azur
write_content(TCPDF $pdf, Object $object, Translate $outputlangs, int $default_font_size, int $tab_top, int $heightforinfotot, int $heightforfreetext, int $heightforfooter)

Function to write pdf content

int
print_line(TCPDF $pdf, string $name, string $value, int $curY, Translate $outputlangs, int $default_font_size, int $add_separator = 1)

Function to print table line

from pdf_azur
void
_tableau(TCPDF $pdf, string $tab_top, string $tab_height, int $nexY, Translate $outputlangs, int $hidetop, int $hidebottom, string $currency = '')

Show table for lines

void
_pagehead(TCPDF $pdf, Object $object, int $showaddress, Translate $outputlangs, string $titlekey = '')

Show top header of page.

from pdf_azur
int
_pagefoot(TCPDF $pdf, Object $object, Translate $outputlangs, int $hidefreetext)

Show footer of page. Need this->emetteur object

from pdf_azur
int
print_column(TCPDF $pdf, string $text, int $curX, int $curY, int $nexY, int $col_width, int $tab_top, int $tab_height, Translate $outputlangs, int $default_font_size, int $add_separator)

Function to print table line

Details

static array getModelsList(DoliDB $db, integer $maxfilenamelength, string $type = '')

Return list of active generation models

Parameters

DoliDB $db Database handler
integer $maxfilenamelength Max length of value to show
string $type Model(s) type

Return Value

array List of templates

__construct(DoliDB $db)

Constructor

Parameters

DoliDB $db Database handler

int write_file(Object $object, Translate $outputlangs, string $srctemplatepath = '', int $hidedetails, int $hidedesc, int $hideref)

Function to build pdf onto disk

Parameters

Object $object Object to generate
Translate $outputlangs Lang output object
string $srctemplatepath Full path of source filename for generator using a template file
int $hidedetails Do not show line details
int $hidedesc Do not show desc
int $hideref Do not show ref

Return Value

int 1=OK, 0=KO

protected write_content(TCPDF $pdf, Object $object, Translate $outputlangs, int $default_font_size, int $tab_top, int $heightforinfotot, int $heightforfreetext, int $heightforfooter)

Function to write pdf content

Parameters

TCPDF $pdf PDF object
Object $object Object to generate
Translate $outputlangs Lang output object
int $default_font_size Default font size
int $tab_top Table top position
int $heightforinfotot Info height
int $heightforfreetext Free text height
int $heightforfooter Footer height

protected int print_line(TCPDF $pdf, string $name, string $value, int $curY, Translate $outputlangs, int $default_font_size, int $add_separator = 1)

Function to print table line

Parameters

TCPDF $pdf PDF object
string $name Row name
string $value Row value
int $curY Current Y position
Translate $outputlangs Lang output object
int $default_font_size Default font size
int $add_separator Should add a row separator or not

Return Value

int next Y position

void _tableau(TCPDF $pdf, string $tab_top, string $tab_height, int $nexY, Translate $outputlangs, int $hidetop, int $hidebottom, string $currency = '')

Show table for lines

Parameters

TCPDF $pdf Object PDF
string $tab_top Top position of table
string $tab_height Height of table (rectangle)
int $nexY Y (not used)
Translate $outputlangs Langs object
int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
int $hidebottom Hide bottom bar of array
string $currency Currency code

Return Value

void

void _pagehead(TCPDF $pdf, Object $object, int $showaddress, Translate $outputlangs, string $titlekey = '')

Show top header of page.

Parameters

TCPDF $pdf Object PDF
Object $object Object to show
int $showaddress 0=no, 1=yes
Translate $outputlangs Object lang for output
string $titlekey Translation key to show as title of document

Return Value

void

int _pagefoot(TCPDF $pdf, Object $object, Translate $outputlangs, int $hidefreetext)

Show footer of page. Need this->emetteur object

Parameters

TCPDF $pdf PDF
Object $object Object to show
Translate $outputlangs Object lang for output
int $hidefreetext 1=Hide free text

Return Value

int Return height of bottom margin including footer text

protected int print_column(TCPDF $pdf, string $text, int $curX, int $curY, int $nexY, int $col_width, int $tab_top, int $tab_height, Translate $outputlangs, int $default_font_size, int $add_separator)

Function to print table line

Parameters

TCPDF $pdf PDF object
string $text Column text
int $curX Current X position
int $curY Current Y position
int $nexY Next Y position
int $col_width Column width
int $tab_top Table top position
int $tab_height Table height
Translate $outputlangs Lang output object
int $default_font_size Default font size
int $add_separator Should add a row separator or not

Return Value

int next X position