Topic: Changing Address font size on INvoice etc

I want to increase the text size on the address to 12 point to comply with postal addressing standards.

adding $this->fontSize += 3; Before printing Address1 in header2.inc works but the line spacing is too tight. When I change the line height, this fixes the address block but breaks the rest of the report. (Yes I am restoring font size and line height after the address is rendered).

How can I restore the lineHeight and Row settings to continue to render the report correctly?

[b]RodW[/b]
Brisbane, QLD, Australia

Re: Changing Address font size on INvoice etc

Hi RodW,

   To developed the Report, you should follow the ways how it work in header2.inc. When you change the line height or whatever related to the fontSize, you should change it back after you use it. Let me show you some example below:

    $this->fontSize += 4;
    $this->Font('bold');
    $this->Text($ccol, $this->company['coy_name'], $icol);
    $this->Font();
    $this->fontSize -= 4;

  The first line indicate that you wish to increase the fontSize by 4. After you render the text, at the last line you should decrease the fontSize by 4. All setting will be back to normal. Hope I answer your question. Thanks you.

Cheers,

tclim

Re: Changing Address font size on INvoice etc

Thanks TCLIM, I have done that and it works well but in the address block, this does not alter the linespacing. So now I need a fix for the linespacing as simply changing the linespacing and restoring it (similar to how you have shown how to restore the font size), breaks the rest of the report. Text no longer lines up with the boxes and detail lines print on top of each other.

Try it. If you scroll down the file to //Address1 and use 12 point ($this->fontSize += 3;) and set the Line Height to
$this->lineHeight +=3;

See what happens when you restore the line height.

[b]RodW[/b]
Brisbane, QLD, Australia

4 (edited by tclim 11/07/2011 09:30:09 am)

Re: Changing Address font size on INvoice etc

Hi RodW,

   Correct me if I am wrong. if you wish to adjust the header2.inc, the "box" and the linespacing are in the top of the header2.inc. Below are some of the code:

vi header2.inc
----------------------------------------------------------------------------------------------------------
               $this->row = $this->pageHeight - $this->topMargin;

        $upper = $this->row - 2 * $this->lineHeight;
        $lower = $this->bottomMargin + 8 * $this->lineHeight;
        $iline1 = $upper - 7.5 * $this->lineHeight;
        $iline2 = $iline1 - 8 * $this->lineHeight;
        $iline3 = $iline2 - 1.5 * $this->lineHeight;
        $iline4 = $iline3 - 1.5 * $this->lineHeight;
        $iline5 = $iline4 - 3 * $this->lineHeight;
        $iline6 = $iline5 - 1.5 * $this->lineHeight;
        $iline7 = $lower;
        $right = $this->pageWidth - $this->rightMargin;
        $width = ($right - $this->leftMargin) / 5;
        $icol = $this->pageWidth / 2;
        $ccol = $this->cols[0] + 4;
               .
              .
              .
----------------------------------------------------------------------------------------------------------

   Your address line height is fall in the  $iline1 (line 28). You should adjust at the TOP of the $iline1 but don't go directly to the // address1 (line 150) and change the lineHeight. I am not sure I understand your question clearly but I do change the TOP variable and it reflect in the Reports. You can change the reports according to need. Hope it help.

Cheers,

tclim