Create a PDF document template: Difference between revisions

Jump to navigation Jump to search
m
Reverted edits by Ikenofopake (talk) to last revision by Eldy
No edit summary
m (Reverted edits by Ikenofopake (talk) to last revision by Eldy)
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://asuxoqonyb.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
----
=[http://asuxoqonyb.co.cc CLICK HERE]=
----
</div>
{{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 (&amp;$pdf, $fac)'. It manages the display of the header.
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
&lt;source lang="php">
<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);
&lt;/source>
</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
&lt;source lang="php">
<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
&lt;/source>
</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.


Navigation menu