Menu

#84 Ignored margins presettings from extending classes

Unstable_(example)
open
nobody
Margins (1)
1
2016-06-07
2016-06-07
No

If you extend the TCPF class, you cannot pre-set margins as the __construct method of tcpd will override them.
Therefore I suggest this little patch:

from (line 1911 of version 6.2.11)

        $margin = 28.35 / $this->k;
        $this->SetMargins($margin, $margin);

to

        $margin = 28.35 / $this->k;
        $lmargin=($this->lMargin ? $this->lMargin : $margin);
        $rmargin=($this->rMargin ? $this->rMargin : $margin);
        $tmargin=($this->tMargin ? $this->tMargin : $margin);
        $this->SetMargins($lmargin, $tmargin, $rmargin);

Discussion


Log in to post a comment.

MongoDB Logo MongoDB