Kerm Posted April 4, 2018 Share Posted April 4, 2018 1.6.1 version I know about function: public function writePage() { $this->SetHeaderMargin(5); $this->SetFooterMargin(21); $this->setMargins(10, 40, 10); $this->AddPage(); $this->writeHTML($this->content, true, false, true, false, ''); } But here changes apply for all PDF documents, like delivery. I need change header margin only for Invoice pdf files, but how? At the moment I solved the problem in the following way: if ($this->template == 'Invoice') { $this->pdf_renderer->writePageInvoice(); } else { $this->pdf_renderer->writePage(); } But I do not know whether this solution is ideal or can be solved as something more simple. Link to comment Share on other sites More sharing options...
tuk66 Posted April 16, 2018 Share Posted April 16, 2018 Your solution IS very simple. Link to comment Share on other sites More sharing options...
tdsoft Posted April 17, 2018 Share Posted April 17, 2018 Thanks 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