View Full Version : iframe PDF preview goes outside the border

26 Oct 2012, 1:26 AM
I need to show the preview of PDF document inside a panel. This panel is inside another Flex layout panel. The last panel is inside a Tab.

I use this HTML fragment:

<div id="scroller" style="height: 100%; width: 100%;"><iframe src="'+record.get('contentUrl')+'" width="100%" height="100%"></iframe></div>

The problem is that the DIV adapt well on the maximum available width but the height is longer than the visible part...

I hope the problem is clear.

I use Sencha Touch 2.0.1


28 Oct 2012, 6:15 AM
The browser is in charge of laying things out. Have you inspected the DOM to see if that div is laid out wrong or a parent element is taller than expected?

29 Oct 2012, 2:26 AM
The panel has the right size (in the DOM too) before I setHtml with the DIV.


After setHtml, the panel has a taller height.



I hope now is more clear.

thanks a lot