Support » Plugin: Embed PDF Viewer » Ability to change size of PDF iframe

  • Resolved olywebdev

    (@olywebdev)


    The plugin displays PDF’s but they’re cut off. Is it possible to resize the frame so it shows a whole page at a time? I’ve tried this on two different sites with different themes and it always cuts them off like this.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andy Fragen

    (@afragen)

    If using in a block you can directly set the height and width. If using as an embed you can adjust using a filter. Below is the filter in the code.

    		/**
    		 * Filter PDF attributes.
    		 *
    		 * @since 1.6.0
    		 * @param array $atts Array of PDF attributes.
    		 * @return array $atts
    		 */
    		$atts = apply_filters( 'embed_pdf_viewer_pdf_attributes', $atts );
    

    Can you set width to percentages? IE 100%

    Plugin Author Andy Fragen

    (@afragen)

    No. Pixels.

    andre2009

    (@andre2009)

    Hi @afragen hi @olywebdev ,

    I came with the same question, looking for a setting to make the iframe responsive and readable to mobile devices.

    To solve I just simply added the CSS:

    
    .embed-pdf-viewer {
        width:100%!important;
    }
    

    @afragen thank you for your valuable work with this plugin, is this option possible to be included in the next version?

    Kind Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ability to change size of PDF iframe’ is closed to new replies.