Topic: Change font size, colors on Orders, Invoices...

Hi developers,

First, thank you for this awesome program. I am glad that I gave FA a try.  I have been using Adempiere for the past 5 years and decided to switch to something lightweight and easier to learn. After using it for 1-2 weeks I already started to feel comfortable with it .  It is fast and  has many features that simply function.

I have few questions concerning document modification if you can help with.

Font size of "Charge to" and "Delivered to" appear too small to read. How to increase it?
How can I change the color and line weight on the header?
Phone number, Fax, Email are in italics. How to make them normal?

If you can point at the php file and line number that affect these I would appreciate it.

Thank you
Jack

Re: Change font size, colors on Orders, Invoices...

Replace 4 with 3 or 2 in the first and last lines of Lines 149 to 152 in reporting/includes/header2.inc:

        $this->fontSize -= 4;
        $this->Text($ccol, $Addr1['title'], $icol);
        $this->Text($mcol, $Addr2['title']);
        $this->fontSize += 4;

Re: Change font size, colors on Orders, Invoices...

Thank you for your quick help. This worked for me.

Do you know the lines for these 2 changes?

Color and line weight on the header? I want to make it bolder and black.
Phone number, Fax, Email are in italics. How to make them normal?

Thank you
Jack

Re: Change font size, colors on Orders, Invoices...

I figured this out.

To change the color of the document title I changed the codes using http://www.color-hex.com/color/d1199b
// Document title
        $this->SetTextColor(190, 190, 190);

To make phone and fax normal I change 'italic' to 'normal':
// Company data
        $this->TextWrapLines($ccol, $icol, $this->company['postal_address']);
        $this->Font('italic');

Re: Change font size, colors on Orders, Invoices...

You might want to refer this link:

function hex2rgb($hex) {
   $hex = str_replace("#", "", $hex);

   if(strlen($hex) == 3) {
      $r = hexdec(substr($hex,0,1).substr($hex,0,1));
      $g = hexdec(substr($hex,1,1).substr($hex,1,1));
      $b = hexdec(substr($hex,2,1).substr($hex,2,1));
   } else {
      $r = hexdec(substr($hex,0,2));
      $g = hexdec(substr($hex,2,2));
      $b = hexdec(substr($hex,4,2));
   }
   $rgb = array($r, $g, $b);
   //return implode(",", $rgb); // returns the rgb values separated by commas
   return $rgb; // returns an array with the rgb values
}

Re: Change font size, colors on Orders, Invoices...

thank you for more information. The only thing I was not able to change is the line height just before charge to delivered to line. I wanted to make this line black and bolder.

7 (edited by apmuthu 02/22/2015 04:13:37 am)

Re: Change font size, colors on Orders, Invoices...

Lines 44 to 47 of reporting/includes/header2.inc:

        $this->SetDrawColor(205, 205, 205);
        $this->Line($iline1, 3);
        $this->SetDrawColor(128, 128, 128);
        $this->Line($iline1);

control that line color and thickness (height).