Documents: Fix pdf show in frames width/height BT#18393

pull/3766/head^2
Julio Montoya 5 years ago
parent 7329eef2c1
commit 4bdde88e10
  1. 9
      main/document/showinframes.php

@ -263,12 +263,17 @@ $file_url_web = $file_url.'?'.api_get_cidreq();
if ($show_web_odf) { if ($show_web_odf) {
echo '<div class="text-center">'; echo '<div class="text-center">';
$browser = api_get_navigator(); $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)) { if ($browser['name'] == 'Mozilla' && preg_match('|.*\.pdf|i', $header_file)) {
$pdfUrl = $file_url; $pdfUrl = $file_url;
} }
echo '<div id="viewerJS">'; 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.'"> src="'.$pdfUrl.'">
</iframe>'; </iframe>';
echo '</div>'; echo '</div>';

Loading…
Cancel
Save