Files
admin
doz
fachprojekt
html2pdf_v4.03
_class
_tcpdf_5.0.002
examples
res
about.php
bookmark.php
exemple00.php
exemple01.php
exemple02.php
exemple03.php
exemple04.php
exemple05.php
exemple06.php
exemple07.php
exemple08.php
exemple09.php
exemple10.php
exemple11.php
exemple12.php
exemple13.php
forms.php
groups.php
js1.php
js2.php
js3.php
qrcode.php
radius.php
regle.php
svg.php
svg_tiger.php
svg_tree.php
ticket.php
utf8.php
locale
_LGPL.txt
_changelog.txt
_lisez_moi.txt
_read_me.txt
html2pdf.class.php
ul.png
ul2.png
ul3.png
htmlpurifier-4.10.0
images
prints
prints3
Kennwortwechsel.php
hauptframe.php
index.php
index_alt.php
index_db.php
index_frame.htm
index_ldap.php
login.php
logout.php
menuframe.htm
styles_pc.css
topframe.php
fachprojekt/html2pdf_v4.03/examples/about.php
2023-02-27 12:57:51 +01:00

41 lines
1.0 KiB
PHP
Executable File

<?php
/**
* HTML2PDF Librairy - example
*
* HTML => PDF convertor
* distributed under the LGPL License
*
* @author Laurent MINGUET <webmaster@html2pdf.fr>
*
* isset($_GET['vuehtml']) is not mandatory
* it allow to display the result in the HTML format
*/
require_once(dirname(__FILE__).'/../htdocs2pdf.class.php');
// get the HTML
ob_start();
include(dirname('__FILE__').'/res/about.php');
$content = ob_get_clean();
try
{
// init HTML2PDF
$html2pdf = new HTML2PDF('P', 'A4', 'fr', true, 'UTF-8', array(0, 0, 0, 0));
// display the full page
$html2pdf->pdf->SetDisplayMode('fullpage');
// convert
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
// add the automatic index
$html2pdf->createIndex('Sommaire', 30, 12, false, true, 2);
// send the PDF
$html2pdf->Output('about.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}