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/js3.php
2023-02-27 12:57:51 +01:00

44 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
*/
// get the HTML
ob_start();
?>
<page>
<h1>Test de JavaScript 3</h1><br>
<br>
Normalement une valeur devrait vous être demandée, puis affichée
</page>
<?php
$content = ob_get_clean();
// PDF script to execute
$script = "
var rep = app.response('Donnez votre nom');
app.alert('Vous vous appelez '+rep);
";
// convert to PDF
require_once(dirname(__FILE__).'/../htdocs2pdf.class.php');
try
{
$html2pdf = new HTML2PDF('P', 'A4', 'fr');
$html2pdf->pdf->IncludeJS($script);
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('js3.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}