cschneider Posted January 8, 2014 Share Posted January 8, 2014 Hi I'm new to PrestaShop. I tried to add a full size image background in the invoice PDF. Therefore I added // get current auto-page-break mode $auto_page_break = $this->AutoPageBreak; // disable auto-page-break $this->SetAutoPageBreak(false, 0); // set background image $img_file = 'filename.jpg'; $this->Image($img_file, 0, 0, 0, 0, 'jpeg', '', 'T', false, 300, '', false, false, 0, true, false, true, false, ''); where filename is the fullname path the the jpg file. The code above from the tcpdf tutorial. I use PrestaShop 1.5.6.1 and modified in the file PDFGenerator.php the writePage() function before SetAutoPageBreak. Any ideas? Regards, Christian. Link to comment Share on other sites More sharing options...
tuk66 Posted January 8, 2014 Share Posted January 8, 2014 From http://stackoverflow.com/questions/11309182/tcpdf-autopagebreak-backgroundimage: You could extend the TCPDF class with a custom header function, and add image to header, with TCPDF::Image. Link to comment Share on other sites More sharing options...
cschneider Posted January 8, 2014 Author Share Posted January 8, 2014 Thank you tuk66 The solution was to paste the code in the Header() function and not in the writePage(). Regards, Christian. Link to comment Share on other sites More sharing options...
stevent Posted September 24, 2014 Share Posted September 24, 2014 merci ! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now