This commit is contained in:
Laurent Destailleur 2011-12-06 00:39:24 +01:00
parent 0f6b1418b1
commit 28afd2e3c6

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com> * Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2010-2011 Regis Houssin <regis@dolibarr.fr>
@ -67,10 +67,10 @@ function pdf_getFormat()
/** /**
* Return a PDF instance object. We create a FPDI instance that instanciate TCPDF. * Return a PDF instance object. We create a FPDI instance that instanciate TCPDF.
* *
* @param format Array(width,height). Keep empty to use default setup. * @param string $format Array(width,height). Keep empty to use default setup.
* @param metric Unit of format ('mm') * @param string $metric Unit of format ('mm')
* @param pagetype 'P' or 'l' * @param string $pagetype 'P' or 'l'
* @return PDF object * @return TPDF PDF object
*/ */
function pdf_getInstance($format='',$metric='mm',$pagetype='P') function pdf_getInstance($format='',$metric='mm',$pagetype='P')
{ {
@ -127,7 +127,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
/** /**
* Return font name to use for PDF generation * Return font name to use for PDF generation
* *
* @param outputlangs Output langs object * @param Translate $outputlangs Output langs object
* @return string Name of font to use * @return string Name of font to use
*/ */
function pdf_getPDFFont($outputlangs) function pdf_getPDFFont($outputlangs)
@ -146,7 +146,7 @@ function pdf_getPDFFont($outputlangs)
/** /**
* Return font size to use for PDF generation * Return font size to use for PDF generation
* *
* @param outputlangs Output langs object * @param Translate $outputlangs Output langs object
* @return int Size of font to use * @return int Size of font to use
*/ */
function pdf_getPDFFontSize($outputlangs) function pdf_getPDFFontSize($outputlangs)
@ -166,13 +166,13 @@ function pdf_getPDFFontSize($outputlangs)
/** /**
* Return a string with full address formated * Return a string with full address formated
* *
* @param outputlangs Output langs object * @param Translate $outputlangs Output langs object
* @param sourcecompany Source company object * @param Societe $sourcecompany Source company object
* @param targetcompany Target company object * @param Societe $targetcompany Target company object
* @param targetcontact Target contact object * @param Contact $targetcontact Target contact object
* @param usecontact Use contact instead of company * @param int $usecontact Use contact instead of company
* @param mode Address type * @param int $mode Address type
* @param deliverycompany Delivery company object * @param Societe $deliverycompany Delivery company object
* @return string String with full address * @return string String with full address
*/ */
function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$deliverycompany='') function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$targetcontact='',$usecontact=0,$mode='source',$deliverycompany='')
@ -265,9 +265,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
/** /**
* Show header of page for PDF generation * Show header of page for PDF generation
* *
* @param PDF $pdf Object PDF * @param PDF &$pdf Object PDF
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param int $page_height Height of page * @param int $page_height Height of page
* @return void
*/ */
function pdf_pagehead(&$pdf,$outputlangs,$page_height) function pdf_pagehead(&$pdf,$outputlangs,$page_height)
{ {
@ -284,12 +285,13 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
/** /**
* Add a draft watermark on PDF files * Add a draft watermark on PDF files
* *
* @param pdf Object PDF * @param PDF &$pdf Object PDF
* @param outputlangs Object lang * @param Translate $outputlangs Object lang
* @param h Height of PDF * @param int $h Height of PDF
* @param w Width of PDF * @param int $w Width of PDF
* @param unit Unit of height (mmn, pt, ...) * @param string $unit Unit of height (mmn, pt, ...)
* @param text Text to show * @param string $text Text to show
* @return void
*/ */
function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text) function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text)
{ {
@ -324,6 +326,7 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text)
* @param cury Y * @param cury Y
* @param account Bank account object * @param account Bank account object
* @param onlynumber Output only number * @param onlynumber Output only number
* @return void
*/ */
function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0) function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
{ {
@ -464,15 +467,15 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
/** /**
* Show footer of page for PDF generation * Show footer of page for PDF generation
* *
* @param pdf The PDF factory * @param PDF &$pdf The PDF factory
* @param outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @param paramfreetext Constant name of free text * @param string $paramfreetext Constant name of free text
* @param fromcompany Object company * @param Societe $fromcompany Object company
* @param marge_basse Margin bottom * @param int $marge_basse Margin bottom
* @param marge_gauche Margin left * @param int $marge_gauche Margin left
* @param page_hauteur Page height * @param int $page_hauteur Page height
* @param object Object shown in PDF * @param Object $object Object shown in PDF
* @param showdetails Show company details * @param int $showdetails Show company details
* @return void * @return void
*/ */
function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0) function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0)
@ -972,13 +975,12 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0,$hookmanage
/** /**
* Return line unit price including tax * Return line unit price including tax
* @param object Object *
* @param i Current line number * @param Object $object Object
* @param outputlangs Object langs for output * @param int $i Current line number
* @param hidedetails Hide value * @param Tranlate $outputlangs Object langs for output
* 0 = no * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines)
* 1 = yes * @return void
* 2 = just special lines
*/ */
function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
{ {
@ -1005,6 +1007,7 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
* @param Translate $outputlangs Object langs for output * @param Translate $outputlangs Object langs for output
* @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines) * @param int $hidedetails Hide details (0=no, 1=yes, 2=just special lines)
* @param HookManager $hookmanager Hook manager instance * @param HookManager $hookmanager Hook manager instance
* @return void
*/ */
function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0,$hookmanager=false) function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0,$hookmanager=false)
{ {
@ -1183,13 +1186,12 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0,$hookman
/** /**
* Return line total including tax * Return line total including tax
* @param object Object *
* @param i Current line number * @param Object $object Object
* @param outputlangs Object langs for output * @param int $i Current line number
* @param hidedetails Hide value * @param Translate $outputlangs Object langs for output
* 0 = no * @param int $hidedetails Hide value (0 = no, 1 = yes, 2 = just special lines)
* 1 = yes * @return void
* 2 = just special lines
*/ */
function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
{ {
@ -1286,5 +1288,4 @@ function pdf_getCurrencySymbol(&$pdf, $currency_code)
return $currency_sign; return $currency_sign;
} }
?> ?>