View Full Version : PDFs and Iframe SSI script II

01-15-2007, 03:27 PM
1) Script Title:

Iframe SSI script II

2) Script URL (on DD):


3) Describe problem:

The above setup works great when I'm loading an HTML page, but does not appear to like PDF files. The PDF visible length is restricted to maybe the top 10% of the first page. Scroll bars are there if you want to view the rest of the page/document. :) The problem appears in both MS IE and FF.

I've tinkered with the marginheight and vspace attributes with no success. Overflow is set to visible. Again, it works fine for HTML, but not for a PDF.

Any thoughts or suggestions?


01-15-2007, 07:07 PM
Doesn't work with PDF's. It needs an HTML document that it can query for the height, otherwise it sees the height as 'undefined' or 0 or null or something like that and, you get a default iframe with no height set. You could edit the script perhaps to give a set height if the query for height is undefined or whatever - this would require testing in all browsers to see what they are getting as height in those situations so, it could be caught and worked with.

My suggestion - don't use it for PDF's, use a regular iframe or, better yet, just load the PDF in a new window like most sites do. I think that is what happens even with no target specified when the link is to a PDF. If not, just set your PDF links target attribute to '_blank'.

01-31-2007, 12:45 PM
<iframe id="myframe" src="externalpage.htm" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

If you can give up the idea of having the iframe resizable, replace the style with set attributes, such as... height="850" width="1100" (as in a standard sized sheet of printer paper).

You can use any length (height) you want but keep in mind that if you have more than a one page PDF (which you should avoid...), you will have to test the length if you want to avoid a scroll bar inside of Acrobat (which is a great way to help your visitor remember that they have something better to do than spend any more time on your site).

I have walked this path before and have used the Iframe SSI script II to reliably display PDF docs that were kept under 90 kb.

If you go over 100 kb, you are certain to loose you Dial-up ISP user's interest because it just takes too darn long to load on that speed connection.

Also, you are strongly advised to serve up an HTML gateway page to let your visitors know what you are about to put them through (http://www.useit.com/alertbox/20030714.html).

This type of page load is great for crashing browsers that do not have Acrobat set up correctly so you need to offer instructions on an HTML page and a "Right Click and Save Target As..." option on the PDF file for those who do not fancy browser lock ups.

Other than that, you can have a blast linking PDF docs using PDF995 or PDFill or better yet, NitroPDF so your visitor can click through your PDF catalog without necessarily having to use the "outside links".

Closing thought: I have never been able to get Acrobat to integrate into any version of Opera so sorry Scandinavia...

Code on!