Skip to content

Commit 37ca009

Browse files
committed
Extend HTML output for pagebreaks for PDF generation
Make HTML output of pagebreak compatible for the different PDF writers by combining: http://mpdf1.com/manual/index.php?tid=110 (tested and working) and https://code.google.com/p/dompdf/wiki/FAQ (tested and working) and http://chandeshparekh.com/css-to-create-new-page-in-php-tcpdf-pdf/
1 parent 5e68fd9 commit 37ca009

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/PhpWord/Writer/HTML/Element/PageBreak.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,13 @@
2424
*/
2525
class PageBreak extends TextBreak
2626
{
27+
/**
28+
* Write page break
29+
*
30+
* @return string
31+
*/
32+
public function write()
33+
{
34+
return '<pagebreak style="page-break-before: always;" pagebreak="true"></pagebreak>';
35+
}
2736
}

0 commit comments

Comments
 (0)