Pdf embed with width 100%

This commit is contained in:
weryques 2018-05-02 14:51:53 -03:00
parent 14b51ed6f8
commit e2808b8f0c
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class Embed {
//$viewer_url = $TAINACAN_BASE_URL . '/assets/pdfjs-dist/web/viewer.html?file=' . $url;
$defaults = array(
'width' => 800,
'width' => '100%%',
'height' => 1000
);
@ -70,7 +70,7 @@ class Embed {
$dimensions = '';
if ( ! empty( $args['width'] ) && ! empty( $args['height'] ) ) {
$dimensions .= sprintf( "width='%d' ", (int) $args['width'] );
$dimensions .= sprintf( "width='%s' ", $args['width'] );
$dimensions .= sprintf( "height='%d' ", (int) $args['height'] );
}