Created
December 2, 2015 05:57
-
-
Save sloanesturz/a7450f67067db01504a7 to your computer and use it in GitHub Desktop.
pdf react
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Basic Example with JSX</title> | |
<link rel="stylesheet" href="engauge.css" /> | |
<script src="//www.parsecdn.com/js/parse-1.6.7.min.js"></script> | |
</head> | |
<body> | |
<!-- TODO: need to move this async --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.2/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.2/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script> | |
<div id="container" /> | |
<script type="text/babel"> | |
var Slides = React.createClass({ | |
render: function() { | |
var url = "slides.pdf#page=" + this.props.pageno; | |
return ( | |
<object data={url} type="application/pdf" height={500} width={600}> | |
// <embed src={url} type="application/pdf" /> | |
</object> | |
); | |
}, | |
}); | |
ReactDOM.render( | |
<Slides pageno={3} />, | |
document.getElementById('container') | |
); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment