forked from pipwerks/PDFObject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpdftest.html
More file actions
92 lines (69 loc) · 3.38 KB
/
pdftest.html
File metadata and controls
92 lines (69 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="McMaster University - SFWR ENG 3F03 - Test 1 2011 Solutions"/>
<link href='https://fonts.googleapis.com/css?family=Lato:300,400,700,900' rel='stylesheet' type='text/css' />
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,900' rel='stylesheet' type='text/css' />
<link rel="icon" type="image/png" href="https://build.communote.net/static/images/favicon.png"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Our first file! Woot woot!</title>
<!-- This example created for PDFObject.com by Philip Hutchison (www.pipwerks.com) -->
<link rel="stylesheet" href="css/pdfobject.css"/>
<script type="text/javascript" src="bundle/pdf-object.js"></script>
<!-- <script type="text/javascript" src="src/loadFile.js"></script> -->
<script type="text/javascript">
/*
PDFObject returns a reference to the JavaScript object (pseudo 'class' instance).
PDFObject.embed() returns a reference to the embedded HTML object.
Knowing this, we store the references in two separate variables and perform
actions with them. For this example, We'll store the PDFObject obj in 'pObj'
and the HTML object in htmlObj.
*/
//var link = "https://s3.amazonaws.com/communote-ads/CommunoteInfographic1.pdf";
var link = "pdfwithads.pdf";
var pObj = new PDF_Object({
url: link,
id: "myPDF",
pdfOpenParams: {
navpanes: 0,
toolbar: 0,
statusbar: 0,
view: "FitH"
}
});
//Note: the PDF has NOT been embedded yet because .embed() has not been invoked.
window.onload = function (){
var desc=document.getElementsByName('description')[0].getAttribute('content');
if (!desc)
{
desc = "Testing the Best PDF Embedder Yet - PDFObject2";
}
loadFile(pObj, desc);
};
</script>
</head>
<body>
<div id="pdf-frame"><div id="pdf"></div></div>
<h1 id="content_title">Testing embedding a PDF using <a href="http://pdfobject.com/">PDFObject</a></h1>
<p id="statement">The embed script didn't load. <a download id="content_link">Download the file here</a>. By the way, we're using <a href="http://pdfobject.com/">PDFObject</a> to embed the document.</p>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: THIS CODE IS ONLY AN EXAMPLE * * */
var disqus_shortname = 'communote'; // Required - Replace example with your forum shortname
var disqus_identifier = '/pdftest'//'a unique identifier for each page where Disqus is present';
var disqus_title = document.title + ' - Comments';
var disqus_url = 'https://communote.net/pdftest';//don't use window.location.href;
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
<script>
document.getElementById('content_link').href= link;
</script>
</body>
</html>