Skip to content

Commit

Permalink
Fixed to use iframe rather than object. This works, but is this the b…
Browse files Browse the repository at this point in the history
…est way of embedding pdf?
  • Loading branch information
juliantenney committed Mar 5, 2015
1 parent 27209fa commit d64980b
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
Original file line number Diff line number Diff line change
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 d64980b

Please sign in to comment.