Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed to use iframe rather than object. This works, but is this the b…
…est way of embedding pdf?
  • Loading branch information
juliantenney committed Mar 5, 2015
1 parent 0818103 commit 5d3cfa2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/xerte/parent_templates/Nottingham/models_html5/pdf.html
Expand Up @@ -10,16 +10,18 @@

// function called every time the size of the LO is changed
this.sizeChanged = function() {
$("#pdfPage").height(pdf.calcHeight());

$("#pdfDoc").height(pdf.calcHeight());
}

this.init = function() {

var height = pdf.calcHeight();

$('#pdfPage').html('<object data="' + eval(x_currentPageXML.getAttribute("url")) + '" type="application/pdf" width="100%" height="' + height + '">');

var height = pdf.calcHeight();

$('#pdfPage').html('<iframe id="pdfDoc" src="http://www.nottingham.ac.uk/toolkits/USER-FILES/10671-cczjrt-Nottingham/media/roundy_or_squary.pdf" type="application/pdf" width="100%" height="' + height + '"></iframe>');

x_pageLoaded();

}

this.calcHeight = function() {
Expand Down

0 comments on commit 5d3cfa2

Please sign in to comment.