

To see this working take a look at this example and watch the console. If you have problems, check the troubleshooting section. Note: Using min-width to set the width of the iFrame, works around an issue in iOS that can prevent the iFrame from sizing correctly. The first ( ) is for the page hosting the iFrames. The package contains two minified JavaScript files in the js folder.
#Iframe scrolling install#
This package can be installed via NPM ( npm install iframe-resizer -save). Iframe-resizer is the result of many 100s of hours of work, if you would like to join others in showing support for the continued development of this project, then please feel free to buy me a coffee. Supports IE 11 ( V3 supports back to IE8) Using CSS Originally, iFrame scrollbars were set using the scrolling attribute.
#Iframe scrolling pdf#
Works with ViewerJS to support PDF and ODF documents.Provides onMouseEnter and onMouseLeave events for the iFrame.scrollWidth : This property defines the entire width of an element in pixels, the element is iframe.

scrollHeight : This property defines the entire height of an element in pixels, the element is iframe. Exposes parent position and viewport size to the iFrame. contentWindow : This property returns the Window object used by an iframe element, basically its defines the iframe window.If one needs to print the PDF, the PDF must be opened fullscreen (in a new tab), but this does not work if you are starting the webapp from the home screen. Provides custom sizing and scrolling methods. It is impossible to scroll to further pages, and it is impossible to print the pdf (printing only prints the image, not the pdf).Fixes in page links in iFrame and supports links between the iFrame and parent page.Simplified messaging between iFrame and host page via postMessage.

#Iframe scrolling code#
