dolibarr  7.0.0-beta
Public Member Functions | Public Attributes | List of all members
pdf_standard Class Reference

Class to generate expense report based on standard model. More...

+ Inheritance diagram for pdf_standard:
+ Collaboration diagram for pdf_standard:

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 write_file ($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
 Function to build pdf onto disk. More...
 
 _pagehead (&$pdf, $object, $showaddress, $outputlangs)
 Show top header of page. More...
 
 _tableau (&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='')
 Show table for lines. More...
 
 _pagefoot (&$pdf, $object, $outputlangs, $hidefreetext=0)
 Show footer of page. More...
 
 addSticker (&$pdf, $outputlangs, $param)
 Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) More...
 
 Add_PDF_card (&$pdf, $textleft, $header, $footer, $outputlangs, $textright='', $idmember=0, $photo='')
 Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) More...
 
 write_file ($object, $outputlangs, $srctemplatepath, $mode='member', $nooutput=0)
 Function to build PDF on disk, then output on HTTP stream. More...
 
 __construct ($db)
 Constructor. More...
 
 write_file ($object, $outputlangs, $srctemplatepath, $hidedetails=0, $hidedesc=0, $hideref=0)
 Function to build a document on disk using the generic odt module. More...
 
 _tableau (&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='')
 Show table for lines. More...
 
 _pagehead (&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
 Show top header of page. More...
 
 _pagefoot (&$pdf, $object, $outputlangs, $hidefreetext=0)
 Show footer of page. More...
 
 __construct ($db)
 Constructor. More...
 
 write_file ($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
 Function to build pdf onto disk. More...
 
 _tableau_cheque (&$pdf, $object, $posy, $outputlangs)
 Show total to pay. More...
 
 _tableau (&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0, $currency='')
 Show table for lines. More...
 
 _pagehead (&$pdf, $object, $showaddress, $outputlangs)
 Show top header of page. More...
 
 _pagefoot (&$pdf, $object, $outputlangs, $hidefreetext=0)
 Show footer of page. More...
 
- Public Member Functions inherited from CommonDocGenerator
 __construct ($db)
 Constructor. More...
 
 get_substitutionarray_user ($user, $outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_mysoc ($mysoc, $outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_thirdparty ($object, $outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_contact ($object, $outputlangs, $array_key= 'object')
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_other ($outputlangs)
 Define array with couple subtitution key => subtitution value. More...
 
 get_substitutionarray_object ($object, $outputlangs, $array_key='object')
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_lines ($line, $outputlangs)
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_shipment ($object, $outputlangs, $array_key='object')
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_shipment_lines ($line, $outputlangs)
 Define array with couple substitution key => substitution value. More...
 
 get_substitutionarray_each_var_object (&$object, $outputlangs, $recursive=true)
 Define array with couple subtitution key => subtitution value. More...
 
 fill_substitutionarray_with_extrafields ($object, $array_to_fill, $extrafields, $array_key, $outputlangs)
 Fill array with couple extrafield key => extrafield value. More...
 
 printRect ($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
 Rect pdf. More...
 
- Public Member Functions inherited from CommonStickerGenerator
 __construct ($db)
 Constructor. More...
 
 write_file ($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir='')
 Function to build PDF on disk, then output on HTTP strem. More...
 
 addSticker (&$pdf, $outputlangs, $param)
 Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) More...
 
 Set_Char_Size (&$pdf, $pt)
 Methode qui permet de modifier la taille des caracteres Cela modiera aussi l'espace entre chaque ligne. More...
 
 _Pointille (&$pdf, $x1=0, $y1=0, $x2=210, $y2=297, $epaisseur=1, $nbPointilles=15)
 protected Print dot line More...
 
 _Croix (&$pdf, $x1=0, $y1=0, $x2=210, $y2=297, $epaisseur=1, $taille=4)
 protected Function realisant une croix aux 4 coins des cartes More...
 
 _Convert_Metric ($value, $src, $dest)
 protected Convert units (in to mm, mm to in) $src and $dest must be 'in' or 'mm' More...
 
 _Get_Height_Chars ($pt)
 protected Give the height for a char size given. More...
 
 _Set_Format (&$pdf, $format)
 protected Set format More...
 

Public Attributes

 $version = 'dolibarr'
 Dolibarr version of the loaded document string.
 

Additional Inherited Members

- Static Public Member Functions inherited from ModelePDFSuppliersPayments
static liste_modeles ($db, $maxfilenamelength=0)
 Return list of active generation models. More...
 
- Static Public Member Functions inherited from ModelePDFProduct
static liste_modeles ($db, $maxfilenamelength=0)
 Return list of active generation modules. More...
 
- Static Public Member Functions inherited from ModeleExpenseReport
static liste_modeles ($db, $maxfilenamelength=0)
 Return list of active generation modules. More...
 

Detailed Description

Class to generate expense report based on standard model.

Class to generate the supplier invoices payment file with the standard model.

Class to build documents using ODF templates generator.

Class to generate stick sheet with format Avery or other personalised.

Definition at line 39 of file pdf_standard.modules.php.

Constructor & Destructor Documentation

pdf_standard::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 65 of file pdf_standard.modules.php.

References description, name, pdf_getFormat(), and type.

pdf_standard::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 87 of file pdf_standard.modules.php.

References description, name, pdf_getFormat(), and type.

pdf_standard::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 65 of file pdf_standard.modules.php.

References description, name, pdf_getFormat(), and type.

Member Function Documentation

pdf_standard::_pagefoot ( $pdf,
  $object,
  $outputlangs,
  $hidefreetext = 0 
)

Show footer of page.

Need this->emetteur object

Parameters
PDF$pdfPDF
FactureFournisseur$objectObject to show
Translate$outputlangsObject lang for output
int$hidefreetext1=Hide free text
Returns
int Return height of bottom margin including footer text

Definition at line 754 of file pdf_standard.modules.php.

References pdf_pagefoot().

pdf_standard::_pagefoot ( $pdf,
  $object,
  $outputlangs,
  $hidefreetext = 0 
)

Show footer of page.

Need this->emetteur object

Parameters
TCPDF$pdfPDF
Object$objectObject to show
Translate$outputlangsObject lang for output
int$hidefreetext1=Hide free text
Returns
int Return height of bottom margin including footer text

Definition at line 834 of file pdf_standard.modules.php.

References pdf_pagefoot().

pdf_standard::_pagefoot ( $pdf,
  $object,
  $outputlangs,
  $hidefreetext = 0 
)

Show footer of page.

Need this->emetteur object

Parameters
PDF$pdfPDF
Object$objectObject to show
Translate$outputlangsObject lang for output
int$hidefreetext1=Hide free text
Returns
int Return height of bottom margin including footer text

Definition at line 850 of file pdf_standard.modules.php.

References pdf_pagefoot().

Referenced by write_file().

pdf_standard::_pagehead ( $pdf,
  $object,
  $showaddress,
  $outputlangs 
)

Show top header of page.

Parameters
PDF$pdfObject PDF
Object$objectObject to show
int$showaddress0=no, 1=yes
Translate$outputlangsObject lang for output
Returns
void

Definition at line 503 of file pdf_standard.modules.php.

References dol_print_date(), dolGetFirstLastname(), pdf_getHeightForLogo(), pdf_getPDFFontSize(), and pdf_watermark().

Referenced by write_file().

pdf_standard::_pagehead ( $pdf,
  $object,
  $showaddress,
  $outputlangs 
)

Show top header of page.

Parameters
PDF$pdfObject PDF
FactureFournisseur$objectObject to show
int$showaddress0=no, 1=yes
Translate$outputlangsObject lang for output
Returns
void

Definition at line 574 of file pdf_standard.modules.php.

References pdf_build_address(), pdf_getHeightForLogo(), pdf_getPDFFontSize(), and pdfBuildThirdpartyName().

pdf_standard::_pagehead ( $pdf,
  $object,
  $showaddress,
  $outputlangs,
  $titlekey = "" 
)

Show top header of page.

Parameters
TCPDF$pdfObject PDF
Object$objectObject to show
int$showaddress0=no, 1=yes
Translate$outputlangsObject lang for output
string$titlekeyTranslation key to show as title of document
Returns
void

Definition at line 683 of file pdf_standard.modules.php.

References $title, pdf_getHeightForLogo(), pdf_getPDFFontSize(), pdf_pagehead(), pdf_watermark(), and pdf_writeLinkedObjects().

pdf_standard::_tableau ( $pdf,
  $tab_top,
  $tab_height,
  $nexY,
  $outputlangs,
  $hidetop = 0,
  $hidebottom = 0,
  $currency = '' 
)

Show table for lines.

Parameters
PDF$pdfObject PDF
integer$tab_topTop position of table
integer$tab_heightHeight of table (rectangle)
int$nexYY (not used)
Translate$outputlangsLangs object
int$hidetopHide top bar of array
int$hidebottomHide bottom bar of array
string$currencyCurrency code
Returns
void

Definition at line 532 of file pdf_standard.modules.php.

References pdf_getPDFFontSize().

pdf_standard::_tableau ( $pdf,
  $tab_top,
  $tab_height,
  $nexY,
  $outputlangs,
  $hidetop = 0,
  $hidebottom = 0,
  $currency = '' 
)

Show table for lines.

Parameters
TCPDF$pdfObject PDF
string$tab_topTop position of table
string$tab_heightHeight of table (rectangle)
int$nexYY (not used)
Translate$outputlangsLangs object
int$hidetop1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
int$hidebottomHide bottom bar of array
string$currencyCurrency code
Returns
void

Definition at line 573 of file pdf_standard.modules.php.

References pdf_getPDFFontSize(), and CommonDocGenerator\printRect().

pdf_standard::_tableau ( $pdf,
  $tab_top,
  $tab_height,
  $nexY,
  $outputlangs,
  $hidetop = 0,
  $hidebottom = 0,
  $currency = '' 
)

Show table for lines.

Parameters
PDF$pdfObject PDF
int$tab_topTab top
int$tab_heightTab height
int$nexYnext y
Translate$outputlangsOutput langs
int$hidetop1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title
int$hidebottomHide bottom bar of array
string$currencyCurrency code
Returns
void

Definition at line 731 of file pdf_standard.modules.php.

References pdf_getPDFFontSize().

Referenced by write_file().

pdf_standard::_tableau_cheque ( $pdf,
  $object,
  $posy,
  $outputlangs 
)

Show total to pay.

Parameters
PDF$pdfObject PDF
PaiementFourn$objectObject PaiementFourn
int$posyPosition depart
Translate$outputlangsObjet langs
Returns
int Position pour suite

Definition at line 469 of file pdf_standard.modules.php.

References pdf_getPDFFontSize(), and price().

Referenced by write_file().

pdf_standard::Add_PDF_card ( $pdf,
  $textleft,
  $header,
  $footer,
  $outputlangs,
  $textright = '',
  $idmember = 0,
  $photo = '' 
)

Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)

  • LOGO is replace with company logo
  • PHOTO is replace with photo provided as parameter
Parameters
PDF$pdfPDF
string$textleftText left
string$headerHeader
string$footerFooter
Translate$outputlangsOutput langs
string$textrightText right
int$idmemberId member
string$photoPhoto (full path to image file used as replacement for key PHOTOS into left, right, header or footer text)
Returns
void

Definition at line 64 of file pdf_standard.class.php.

References CommonStickerGenerator\_Croix(), dol_getImageSize(), and get_exdir().

Referenced by write_file().

pdf_standard::addSticker ( $pdf,
  $outputlangs,
  $param 
)

Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)

Parameters
PDF$pdfPDF reference
Translate$outputlangsOutput langs
array$paramAssociative array containing label content and optional parameters
Returns
void

Definition at line 45 of file pdf_standard.class.php.

pdf_standard::write_file (   $object,
  $outputlangs,
  $srctemplatepath,
  $hidedetails = 0,
  $hidedesc = 0,
  $hideref = 0 
)

Function to build a document on disk using the generic odt module.

Parameters
Product$objectObject source to build document
Translate$outputlangsLang output object
string$srctemplatepathFull path of source filename for generator using a template file
int$hidedetailsDo not show line details
int$hidedescDo not show desc
int$hiderefDo not show ref
Returns
int 1 if OK, <=0 if KO

Definition at line 131 of file pdf_standard.modules.php.

References _pagefoot(), _pagehead(), dol_concatdesc(), dol_htmlentitiesbr(), dol_mkdir(), dol_sanitizeFileName(), pdf_getInstance(), pdf_getPDFFont(), and pdf_getPDFFontSize().

pdf_standard::write_file (   $object,
  $outputlangs = '',
  $srctemplatepath = '',
  $hidedetails = 0,
  $hidedesc = 0,
  $hideref = 0 
)

Function to build pdf onto disk.

Parameters
PaiementFourn$objectId of object to generate
Translate$outputlangsLang output object
string$srctemplatepathFull path of source filename for generator using a template file
int$hidedetailsDo not show line details
int$hidedescDo not show desc
int$hiderefDo not show ref
Returns
int 1=OK, 0=KO

Supplier invoice list

Definition at line 135 of file pdf_standard.modules.php.

References $resql, _pagefoot(), _pagehead(), _tableau(), _tableau_cheque(), dol_mkdir(), dol_sanitizeFileName(), pdf_getInstance(), pdf_getPDFFont(), pdf_getPDFFontSize(), and price().

pdf_standard::write_file (   $object,
  $outputlangs,
  $srctemplatepath = '',
  $hidedetails = 0,
  $hidedesc = 0,
  $hideref = 0 
)

Function to build pdf onto disk.

Parameters
Object$objectObject to generate
Translate$outputlangsLang output object
string$srctemplatepathFull path of source filename for generator using a template file
int$hidedetailsDo not show line details
int$hidedescDo not show desc
int$hiderefDo not show ref
Returns
int 1=OK, 0=KO

Definition at line 150 of file pdf_standard.modules.php.

References _pagefoot(), _pagehead(), _tableau(), dol_concatdesc(), dol_htmlentitiesbr(), dol_mkdir(), dol_nboflines_bis(), dol_print_date(), dol_sanitizeFileName(), dol_trunc(), pdf_getInstance(), pdf_getlinevatrate(), pdf_getPDFFont(), pdf_getPDFFontSize(), and price().

pdf_standard::write_file (   $object,
  $outputlangs,
  $srctemplatepath,
  $mode = 'member',
  $nooutput = 0 
)

Function to build PDF on disk, then output on HTTP stream.

Parameters
Adherent$objectMember object. Old usage: Array of record informations (array('textleft'=>,'textheader'=>, ...'id'=>,'photo'=>)
Translate$outputlangsLang object for output language
string$srctemplatepathFull path of source filename for generator using a template file. Example: '5161', 'AVERYC32010', 'CARD', ...
string$modeTell if doc module is called for 'member', ...
int$nooutput1=Generate only file on disk and do not return it on response
Returns
int 1=OK, 0=KO

Definition at line 247 of file pdf_standard.class.php.

References $title, CommonStickerGenerator\_Set_Format(), Add_PDF_card(), complete_substitutions_array(), dol_mimetype(), dol_mkdir(), dol_print_date(), dol_print_error(), get_exdir(), make_substitutions(), pdf_getInstance(), pdf_getPDFFont(), and type.


The documentation for this class was generated from the following files: