Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: ed83cb5bd8
Fetching contributors…

Cannot retrieve contributors at this time

57 lines (39 sloc) 1.44 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Embedding a PDF using PDFObject: Simple example with basic CSS</title>
<!-- This example created for by Philip Hutchison ( -->
<!-- CSS for basic page styling, not related to example -->
<link href="css/examples.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#pdf {
width: 500px;
height: 300px;
margin: 2em auto;
border: 10px solid #6699FF;
#pdf p {
padding: 1em;
#pdf object {
display: block;
border: solid 1px #666;
<script type="text/javascript" src="../code/pdfobject.js"></script>
<script type="text/javascript">
window.onload = function (){
var success = new PDFObject({ url: "pdf/sample.pdf" }).embed("pdf");
<h1>Embedding a PDF using PDFObject: Simple example with basic CSS</h1>
<p>This example uses one line of JavaScript wrapped in a <em>window.onload</em> statement, with a little CSS added to control the styling of the embedded element.</p>
<div id="pdf">It appears you don't have Adobe Reader or PDF support in this web browser. <a href="pdf/sample.pdf">Click here to download the PDF</a></div>
<p><a href="/index.php">&laquo; Return to PDFObject home</a></p>
Jump to Line
Something went wrong with that request. Please try again.