Skip to content

Commit

Permalink
Documents: Fix pdf show in frames width/height BT#18393
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Feb 15, 2021
1 parent 7329eef commit 4bdde88
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main/document/showinframes.php
Expand Up @@ -263,12 +263,17 @@
if ($show_web_odf) {
echo '<div class="text-center">';
$browser = api_get_navigator();
$pdfUrl = api_get_path(WEB_LIBRARY_PATH).'javascript/ViewerJS/index.html#'.$file_url;
$pdfUrl = api_get_path(WEB_LIBRARY_PATH).'javascript/ViewerJS/index.html?zoom=page-width#'.$file_url;
if ($browser['name'] == 'Mozilla' && preg_match('|.*\.pdf|i', $header_file)) {
$pdfUrl = $file_url;
}
echo '<div id="viewerJS">';
echo '<iframe id="viewerJSContent" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen style="width:100%;"
echo '<iframe
id="viewerJSContent"
frameborder="0"
allowfullscreen="allowfullscreen"
webkitallowfullscreen
style="width:100%;height:600px;"
src="'.$pdfUrl.'">
</iframe>';
echo '</div>';
Expand Down

0 comments on commit 4bdde88

Please sign in to comment.