example49_changelog.php 889 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. ini_set("memory_limit","384M");
  3. // This is because changelog.txt contains over 100000 characters, and preg_* functions in mPDF won't work.
  4. ini_set("pcre.backtrack_limit","200000");
  5. include("../mpdf.php");
  6. $mpdf=new mPDF();
  7. $mpdf->tabSpaces = 6;
  8. $mpdf->allow_charset_conversion=true;
  9. $mpdf->charset_in='windows-1252';
  10. //==============================================================
  11. $html = '
  12. <h1>mPDF</h1>
  13. <h2>ChangeLog</h2>
  14. <div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;">
  15. ';
  16. $lines = file('../CHANGELOG.txt');
  17. $html .= '<pre>';
  18. foreach($lines AS $line) {
  19. $html .= htmlspecialchars($line);
  20. }
  21. $html .= '</pre>';
  22. $html .= '</div>';
  23. //==============================================================
  24. $mpdf->WriteHTML($html);
  25. $mpdf->Output();
  26. exit;
  27. ?>