Jump to content

Pdf Pagebreaks In Prestashop 1.6


socialcowboy

Recommended Posts

I've been searching for hours but can't seem to find the right answer..

 

We have created our own pdf invoices, but encounter 1 problem.. PageBreaks.

On large order the footer and content overlap - so the page break is too late.

 

Can someone please provide me the right solution?

Link to comment
Share on other sites

Thanks, I have already been doing that but can't seem to figure it out.

 

   public function writePage()
    {
        $this->SetHeaderMargin(20);
        $this->SetFooterMargin(40);
        $this->setMargins(10, 45, 10, );
$this->AddPage();
        $this->writeHTML($this->content, true, false, true, false, '');
 
Increasing Footer margin just makes the footer come up.
In the SetMargins i have no idea how to set the bottom margin.
I tried (10,45,10,150) but the 4th one doesn't seem to show up anywhere.
Link to comment
Share on other sites

Sorry, I'm perhaps wrong. This method looks:

 

Defines the left, top and right margins.
     * @param $left (float) Left margin.
     * @param $top (float) Top margin.
     * @param $right (float) Right margin. Default value is the left one.
     * @param $keepmargins (boolean) if true overwrites the default page margins
     * @public
     * @since 1.0
     * @see SetLeftMargin(), SetTopMargin(), SetRightMargin(), SetAutoPageBreak()
     */
public function SetMargins($left, $top, $right=-1, $keepmargins=false) {

...

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...