| | |
PDF Preload
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
I have a large pdf (>1 MB)that i want to preload on a html page that says "Please wait..." and display that at the middle of the screen.. so that users know that the pdf is loading (i know it says it at the bottom of the screen, but i'm worried they might not see that). How can i preload a pdf in an html page and then have it display?
or how to embed a pdf file using html or any language? thank you for any ideas.
or how to embed a pdf file using html or any language? thank you for any ideas.
TRY MY SUGGESTIONS AT YOUR OWN RISK
Do other alternative first..cheap and easy ways..
Don't take out money from your pocket when you're not so sure that it will solve the problem..
Do other alternative first..cheap and easy ways..
Don't take out money from your pocket when you're not so sure that it will solve the problem..
it is possible with JavaScript not possible in HTML, post this in JavaScript forum
Thanx,
Shiriyal
http://shiriyal.blogspot.com/
if you problem solved add me as a reputation and mark it mark as solved
Shiriyal
http://shiriyal.blogspot.com/
if you problem solved add me as a reputation and mark it mark as solved
Put this in the head tag of your webpage:
Replace "2" with the number of seconds the user will wait until he will be redirected to "pdfdoc.pdf" (replace it with your pdf file's path).
You may also use a hidden iframe with the pdf file which will load while the "Loading..." text will be shown to the user. After it is loaded you can make the iframe visible using javascript.
HTML and CSS Syntax (Toggle Plain Text)
<meta http-equiv="refresh" content="2;url=http://www.yourwebsite.com/pdfdoc.pdf">
You may also use a hidden iframe with the pdf file which will load while the "Loading..." text will be shown to the user. After it is loaded you can make the iframe visible using javascript.
--Silviu Bogan
It is possible, preferable?, to actually preload the .pdf file so that the impression of instant loading is given.
in the page prior to the pdf linked page add a preload script
in the page prior to the pdf linked page add a preload script
In browsers with javascript disabled, the function degrades gracefullyThe code above placed betweenjavascript Syntax (Toggle Plain Text)
<script language="javascript" type="text/javascript"> //<![CDATA[ <!-- image1 = new Image(); image1.src = "http://mysite.com/mypdf.pdf"; //--> //]]> </script></body>and</html>in the page containing the link to the .pdf file (or html file with the .pdf in it) instructs the browser to download the pdf file to the browser cache, but just leave it there.
(filetype is irelevant image() is convenient, use the same script for any filetype as it is not ever going to be rendered)
the download happens after the page is fully rendered so does not delay the current page.
on clicking the link to the .pdf file (or html page) the browser finds the .pdf in the browser cache and does not download it, but displays from the cache, at apparently blinding download speeds.
Last edited by almostbob; Jun 17th, 2009 at 10:46 am.
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
hope it works for you
I use the script to load large images of the inpage thumbnails so the fullsize image changes instalntly on mouseclick
+ have some instructional .pdfs load so they open onclick
I use the script to load large images of the inpage thumbnails so the fullsize image changes instalntly on mouseclick
+ have some instructional .pdfs load so they open onclick
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
![]() |
Similar Threads
- Web Address For Free Downloading Of Pdf Copy Of A Php Book (PHP)
- download pdf file, convert to html, in PHP since working in Linux (PHP)
- Error message when creating PDF (OS X)
- Default program to open *.pdf (Mac Software)
- Convert a Flash page to PDF format? (Graphics and Multimedia)
Other Threads in the HTML and CSS Forum
- Previous Thread: Tabs problem
- Next Thread: How to make a drop down menu.
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash font fonts form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 xml xsl






