PDFobject Better Test

A Better demo of PDFobject.

by prateekbansal07

HTML

<script src="http://pdfobject.com/scripts/pdfobject.js"></script>
<html>
<head>
<title>PDFObject Example</title>
</head>
<body>
<object data='http://pdfobject.com/pdf/sample.pdf#search=location' 
        type='application/pdf' 
        width='100%' 
        height='100%'>

</object>
</body>
</html>

CSS

@charset "UTF-8";

body {
    font: small Arial, Helvetica, sans-serif;
    color: #454545;
    background: #F8F8F8;
    margin: 0px;
    padding: 2em;
}

h1 {
    font-weight: normal;
    font-size: x-large;
}

a:link, a:visited {
    color: #3333FF;
    text-decoration: none;
    border-bottom: 1px dotted #3333FF;
}

a:hover, a:visited:hover {
    color: #FF3366;
    text-decoration: none;
    border-bottom: 1px solid #FF3366;
}

#pdf {
    width: 90%;
    height: 75%;
    margin: 2em auto;
    border: 0.2em solid #6699FF;
}

#pdf p {
   padding: 1em;
}

#pdf object {
    display: block;
    //border: solid 0px #666;
}

JavaScript

function embedPDF(){

  var myPDF = new PDFObject({ 

    url: 'http://pdfobject.com/pdf/sample.pdf',
    pdfOpenParams: { search: 'location' }

  }).embed();  

}

window.onload = embedPDF;