Copier le code du code comme suit:
<html>
<adal>
<meta http-equiv = "contenu-type" contenu = "text / html; charset = gbk">
<Title> jspdf </Title>
<script type = "text / javascript" src = "jspdf.js"> </ script>
<script type = "text / javascript">
window.onload = function () {
var doc = new jspdf ();
// var doc = nouveau jspdf ('paysage');
Doc.setproperties ({// Définissez l'attribut de document
Titre: «Titre»,
Sujet: «C'est le sujet»,
Auteur: «Dragon»,
Mots-clés: «JavaScript, Web 2.0, Ajax»,
Créateur: 'meee'
});
doc.seTTextColor (0,255,0);
doc.setFontsize (22);
doc.setfont ("fois");
doc.setfontType ("italique");
Doc.Text (20, 20, «Hello World!»);
doc.seTTextColor (255,0,0);
doc.setFontsize (16);
doc.setfont ("Helvetica");
doc.setFontType ("Bold");
Doc.Text (20, 30, «Ceci est JavaScript de taille client, pompant un PDF.»);
doc.addpage ();
doc.setlinewidth (1);
Doc.setdrawcolor (0,255,0);
doc.setFillColor (255,0,0);
Doc.line (60, 20, 115, 60);
Doc.rect (100, 50, 20, 30);
Doc.Ellipse (20, 20, 20, 10, «F»);
Doc.Circle (120, 20, 20, «FD»);
Doc.Triangle (100, 100, 110, 100, 120, 130, «FD»);
//doc.output ('Datauri'); // Sortie directement vers la nouvelle page Web
document.getElementById ("iframe123").
}
</cript>
</ head>
<body>
<iframe id = "iframe123" frameborder = "0"> </ iframe>
</docy>
</html>