/** * Write out the current text flow adding pages as necessary */ public function write() { do { $continue = false; $return = $this->pdf->fit_textflow($this->currentText, 25, 25, $this->pageWidth - 20, $this->currentY, ''); if ($return == '_boxfull' || $return == '_nextpage') { $this->newPage(); $continue = true; } } while ($continue); $this->currentY = $this->pdf->info_textflow($this->currentText, 'textendy'); if ($this->currentY < 25) { $this->newPage(); } $this->pdf->delete_textflow($this->currentText); $this->currentText = $this->pdf->create_textflow('', ''); }