Pageborders

Daniel
2005-06-27
2013-04-24
  • Daniel

    Daniel - 2005-06-27

    Hello to all,

    is there somebody who can tell me how to set left and right borders?

    If I use $pdf->SetMargins(20,15,20);

    the result is 20,15,0. Could that be?

    Best wishes

    Daniel

     
    • molly

      molly - 2006-01-11

      Hi Daniel

      Insert into fpdf.php in function SetMargins() the following line from html2fpdf.php:

        $this->pgwidth = $this->fw - $this->lMargin - $this->rMargin ;

      Looks like:

      function SetMargins($left,$top,$right=-1)
      {
              //Set left, top and right margins
              $this->lMargin=$left;
              $this->tMargin=$top;
              if($right==-1) $right=$left;
              $this->rMargin=$right;

              // For HTML2FPDF
              $this->pgwidth = $this->fw - $this->lMargin - $this->rMargin ;
      }

      This is one way to fix it!

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks