31,003
edits
Ikenofopake (talk | contribs) No edit summary |
m (Reverted edits by Ikenofopake (talk) to last revision by Eldy) |
||
| Line 1: | Line 1: | ||
{{TemplateDocDevEn}} | {{TemplateDocDevEn}} | ||
| Line 28: | Line 20: | ||
= Customize content of your new template = | = Customize content of your new template = | ||
Customize the template created. Still in file pdf_propale_mycompanyblue.modules.php, search function 'Function _pagehead (& | Customize the template created. Still in file pdf_propale_mycompanyblue.modules.php, search function 'Function _pagehead (&$pdf, $fac)'. It manages the display of the header. | ||
== Library for PDF manipulation == | == Library for PDF manipulation == | ||
| Line 58: | Line 50: | ||
=== Insert a logo === | === Insert a logo === | ||
* Add following instructions | * Add following instructions | ||
<source lang="php"> | |||
$pdf->Image('\www\htdocs\dolibarr\document\societe\logo.jpg', 10, 5, 60.00); | $pdf->Image('\www\htdocs\dolibarr\document\societe\logo.jpg', 10, 5, 60.00); | ||
</source> | |||
With this example: 10=abscissa, 5=ordinate, 60=with of logo | With this example: 10=abscissa, 5=ordinate, 60=with of logo | ||
* If logo is on or outside existing text, remove exisiting text by commenting the code that output the text or by changing its position. | * If logo is on or outside existing text, remove exisiting text by commenting the code that output the text or by changing its position. | ||
| Line 66: | Line 58: | ||
=== Insert text === | === Insert text === | ||
Most comme function to use | Most comme function to use | ||
<source lang="php"> | |||
$pdf->setX(float a); // set current x position | $pdf->setX(float a); // set current x position | ||
$pdf->setY(float b); // set current y position | $pdf->setY(float b); // set current y position | ||
| Line 73: | Line 65: | ||
$pdf->SetFont('Arial','B',14); // fixe la police, le type ( 'B' pour gras, 'I' pour italique, '' pour normal,...) | $pdf->SetFont('Arial','B',14); // fixe la police, le type ( 'B' pour gras, 'I' pour italique, '' pour normal,...) | ||
$pdf->MultiCell(60, 8, 'Mon texte", 0, 'L'); // imprime 'Mon texte' avec saut de ligne | $pdf->MultiCell(60, 8, 'Mon texte", 0, 'L'); // imprime 'Mon texte' avec saut de ligne | ||
</source> | |||
Note: Origin for setXY functions are the top left corner of page. | Note: Origin for setXY functions are the top left corner of page. | ||