Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix: add width and minimum height of cells parameters

  • Loading branch information...
commit 14b6173d872ea7960c1ef514be862a91f85a5a10 1 parent d7c8f4d
Regis Houssin authored
View
8 htdocs/core/lib/pdf.lib.php
@@ -694,12 +694,14 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
* @param Translate $outputlangs Object lang
* @param int $posx X
* @param int $posy Y
+ * @param float $w Width of cells. If 0, they extend up to the right margin of the page.
+ * @param float $h Cell minimum height. The cell extends automatically if needed.
* @param int $align Align
* @param string $default_font_size Font size
* @param HookManager $hookmanager Hook manager object
* @return void
*/
-function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$align,$default_font_size,$hookmanager=false)
+function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$align,$default_font_size,$hookmanager=false)
{
$linkedobjects = pdf_getLinkedObjects($object,$outputlangs,$hookmanager);
if (! empty($linkedobjects))
@@ -709,13 +711,13 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$align,$d
$posy+=3;
$pdf->SetXY($posx,$posy);
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->MultiCell(100, 3, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align);
+ $pdf->MultiCell($w, $h, $linkedobject["ref_title"].' : '.$linkedobject["ref_value"], '', $align);
if (! empty($linkedobject["date_title"]) && ! empty($linkedobject["date_value"]))
{
$posy+=3;
$pdf->SetXY($posx,$posy);
- $pdf->MultiCell(100, 3, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align);
+ $pdf->MultiCell($w, $h, $linkedobject["date_title"].' : '.$linkedobject["date_value"], '', $align);
}
}
}
View
2  htdocs/core/modules/commande/doc/pdf_edison.modules.php
@@ -653,7 +653,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs ,$hookmanager)
$posy+=1;
// Show list of linked objects
- $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager);
+ $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'L', $default_font_size, $hookmanager);
}
/**
View
2  htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -930,7 +930,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $hookmanager)
$posy+=2;
// Show list of linked objects
- $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
+ $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager);
if ($showaddress)
{
View
2  htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1125,7 +1125,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $hookmanager)
$posy+=2;
// Show list of linked objects
- $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
+ $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager);
if ($showaddress)
{
View
2  htdocs/core/modules/facture/doc/pdf_oursin.modules.php
@@ -1003,7 +1003,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $hookmanager)
$posy+=1;
// Show list of linked objects
- $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'L', $default_font_size, $hookmanager);
+ $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'L', $default_font_size, $hookmanager);
// Amount in (at tab_top - 1)
$pdf->SetTextColor(0,0,0);
View
2  htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -985,7 +985,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $hookmanager)
$posy+=2;
// Show list of linked objects
- $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 'R', $default_font_size, $hookmanager);
+ $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size, $hookmanager);
if ($showaddress)
{
Please sign in to comment.
Something went wrong with that request. Please try again.