How to change the border style in file invoice(*.pdf) from “solid” to “dotted”?
I just want to change the border style: so that the outer and inside border’s is “dotted”, not “solid”…
I found and began to change the file: pdf_crabe.modules.php, which is in the directory: htdocs/core/modules/facture/doc and I managed to change, but only the internal border … Pffff
I found the following code:
… // Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array(‘dash’=>‘1,1’,‘color’=>array(40,40,40)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
$pdf->SetLineStyle(array(‘dash’=>0));
}
$nexY+=2; // Passe espace entre les lignes
…
I’ll try to figure it out …
ksar, thank’s for your link, but perhaps this is not exactly what will help…
But thanks anyway!
Can anybody help to change “solid” borders to “dotted” borders in the dolibarr invoice (*.pdf)?
I installed iDolibarr on my Synology (NAS), but the way I did before (changed in the default module “crabe”), does not work anymore …
Pfffff…
Having carefully studied the structure of the TCPDF, I found a solution:
Open the file pdf_crabe.modules.php ( located /htdocs/core/modules/facture/doc)
And then we use line style. Array with keys among the following: * widthi[/i]: Width of the line in user units. * capi[/i]: Type of cap to put on the line. Possible values are: butt, round, square. The difference between “square” and “butt” is that “square” projects a flat end past the end of the line. * joini[/i]: Type of join. Possible values are: miter, round, bevel. * dashi[/i]: Dash pattern. Is 0 (without dash) or string with series of length values, which are the lengths of the on and off dashes. For example: “2” represents 2 on, 2 off, 2 on, 2 off, …; “2,1” is 2 on, 1 off, 2 on, 1 off, … * phasei[/i]: Modifier on the dash pattern which is used to shift the point at which the pattern starts. * colori[/i]: Draw color. Format: array( GREY ) or array ( R,G,B ) or array( C,M,Y,K ).
What are the setting you have used for the no border and dotted lines? If you could kindly specifiy which settings produce which line (based on your picture) then I can move this post to the Tips and Tricks category to benefit other users.