Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
<!doctype>
2
<html>
3
<head>
4
	<title>jsPDF</title>
5
	<link rel="stylesheet" type="text/css" href="css/main.css">
6
	<script type="text/javascript" src="../libs/base64.js"></script>
7
	<script type="text/javascript" src="../jspdf.js"></script>
8
	<script type="text/javascript" src="../libs/downloadify/js/swfobject.js"></script>
9
	<script type="text/javascript" src="../libs/downloadify/js/downloadify.min.js"></script>
10
</head>
11
 
12
<body onload="load()">
13
<h1>jsPDF Downloadify Example</h1>
14
 
15
<p>This is an example of jsPDF using <a href="http://www.downloadify.info/">Downloadify</a>. This works in all major browsers.</p>
16
 
17
<p id="downloadify">
18
	You must have Flash 10 installed to download this file.
19
</p>
20
 
21
<script type="text/javascript">
22
	function load(){
23
		Downloadify.create('downloadify',{
24
			filename: 'Example.pdf',
25
			data: function(){
26
				var doc = new jsPDF();
27
				doc.text(20, 20, 'PDF Generation using client-side Javascript');
28
				doc.addPage();
29
				doc.text(20, 20, 'Do you like that?');
30
				return doc.output();
31
			},
32
			onComplete: function(){ alert('Your File Has Been Saved!'); },
33
			onCancel: function(){ alert('You have cancelled the saving of this file.'); },
34
			onError: function(){ alert('You must put something in the File Contents or there will be nothing to save!'); },
35
			swf: '../libs/downloadify/media/downloadify.swf',
36
			downloadImage: '../libs/downloadify/images/download.png',
37
			width: 100,
38
			height: 30,
39
			transparent: true,
40
			append: false
41
		});
42
	}
43
</script>
44
</body>
45
</html>