Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPDI importPage does not work with autoPageBreak=1 #41

Closed
maechler opened this issue Apr 24, 2018 · 0 comments
Closed

FPDI importPage does not work with autoPageBreak=1 #41

maechler opened this issue Apr 24, 2018 · 0 comments
Assignees
Labels

Comments

@maechler
Copy link
Member

maechler commented Apr 24, 2018

The fix to this issue should at least be mentioned in the section trouble shooting. Probably we can also include a fix like this for EmptyFPDI:

class YourPDF extends FPDI {
   public function AddPage($orientation = '', $format = '', $rotationOrKeepmargins = false, $tocpage = false)
   {
      parent::AddPage($orientation, $format, $rotationOrKeepmargins, $tocpage);
      
      if ($this->tpl !== 0) {
          $this->useTemplate($this->tpl);
      }
   }
}

It has to be tested whether this works if different pages are imported in one PDF or not. It should also be possible to not import the template anymore, if the PageViewHelper is used without the option importPage. That is not possible with this quick fix. Maybe we could also include an option to make this optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant