Topic on Extension talk:PDFEmbed

Automatically fit to width

2
212.83.194.34 (talkcontribs)

Hi, is it possible to command the pdf to automatically fit to width?

RodolfoEBDR (talkcontribs)

Change the file PDFEmbed.hooks

static private function embed(File $file, $width, $height, $page) {

       return Html::rawElement(

           'iframe',

           [

               //'width' => $width,

               'width' => '100%',

               'height' => $height,

               'src' => $file->getFullUrl().'#page='.$page,

               'style' => 'max-width: 100%;'

           ]

       );

   }

Reply to "Automatically fit to width"