Embed PDF will randomly not display - html

We are displaying an inline PDF via an object tag:
<object data='myPDF.pdf' type='application/pdf' width='100%' height='100%'></object>
On most loads, this works just fine - the browser will display the PDF using adobe's browser plugin-in. However, sometimes the browser will not display the PDF - it will load either a transparent or blank white background with no content inside it. This is occuring in both Firefox and Chrome browser. IE does not seem have this issue.
Even more bizarre - after the issue occurs, if we resize or move the browser, the PDF magically re-appears.
Has this ever happened to anyone else? Any ideas on how to improve this performance?

I think it has something to do with Adobe, I've encountered it too but never found a solution. It doesn't matter wich browser I use or wich computer. It just happens some times...

I know this is an old post but I've just had a similar problem and couldn't find a solution online.
I discovered some of my pdf's had a capitalised extension (.PDF), once I lower-cased them all it works fine for both in iframe and embed.

Related

A pdf in an iframe is displayed differently depending on browser

I want to show a pdf document within an iframe, (that's a client request not to leave the page).
This pdf document is a fictional form that has notes in order to explain to user how to fill it later.
You can see it here:
http://www.ideforce.fr/?q=content/processus-dinscription-chsct (click the “Example” button)
It works in Firefox (pdf shows up, notes are displayed on hover). In Opera pdf shows up, but I can't show the notes. In Chrome and Safari, the pdf displays ridiculously tiny, but I can zoom it, then the text in the notes misses the apostrophes and accentuated letters disappear (you'll have notice the site is french…)
Does the problem come from the web browser? Below is how I've implemented the iframe.
<iframe class="affichage-pdf" src="/sites/default/files/bi_cdt_test.pdf" frameborder="0"></iframe>
Or does the problem come from the pdf generated?
I would love to understand what is wrong.
NB:
In Opera I get the notes, but without the accents still.
Please tryout these two codes:
<object class="affichage-pdf" data="/sites/default/files/bi_cdt_test.pdf"></object>
<object data="/sites/default/files/bi_cdt_test.pdf"></object>
One of them should be working absolutely fine. Instead of iframe try with object as it is more powerful tag than iframe.

Chrome can't see images that require username/password

So this is a weird problem, I am attempting to embed a video stream from a D-Link DCS-930L into a web page. My embed looks like this:
<img alt="" src="http://guest:password#192.0.0.10/video.cgi">
The problem is that Chrome displays a broken link image when I load the page, while Firefox and IE load it perfectly the first time.
But the really strange part is that if I right click on the broken image > Open link in new tab the stream loads, and then if I close the tab and refresh the page with the embed it loads there too! So it's definitely something to do with the username/password requirement.
I have also tried creating a user without a password but I see the same issue. There is no setting to disable this requirement in the 930L's control panel that I can find.
Does anyone know how to fix this? If not, is there a way to use PHP to execute a login automatically for the above kind of URLs?
This appears to be intentional behavior on Chrome's part since v19. Bummer.

Issues on chrome showing an embedded PDF

I have the following code in a html document:
<p>PDF sample</p>
<object data="http://www.whateverdomain.com/whatever/~/media/sample.pdf" type="application/pdf"></object>
This is working in IE, Firefox but not in Chrome. Appears a grey box in the browser with no embedded pdf. When I check on "network" tab in chrome I'm receiving a HTTP 200 response but PDF is not shown.
I tried URL encode tilde "~" symbol replacing it by %7e but still its not working on Chrome.
I don't have the possibility of changing the url which is provided by an external service.
Do you have any clue on how to solve ?
You might wish to try and use a simple iframe. At the very least I am pretty sure that works for chrome, might not work for IE though. Another alternative is using the Google Docs viewer, with that you are sure to be cross browser compatible, although some pdf's might not render perfectly. The last option you have is using something like pdf.js to render the pdf's yourself inside the browser. Gives you a lot of control and ensures that even people running computers without a pdf viewer installed (or a native pdf viewer like chrome and firefox) will be able to view the file.

Google Chrome crushes when multiple html5 videos are at the same page - how to prevent?

I have one video on my page but I overwrite the attributes and source file links via jQuery when clicking on a thumbnail. It works perfectly in Firefox, but when playing or closing the second video in Chrome there is a browser crash. Anything I could do to work that out? Do I have to erase the browser cache after closing the first video maybe? Any ideas? Anyone with the same problem?
The problem was that the jQuery.min.map file was missing. If you have the same problem please have a look at this post: Error 'jquery-2.0.2.min.map not found'
After downloading and renaming the min map file it worked

Anyone tried Youtube API iframe on IE9?

I'm trying to use the sample code on this page. I copy paste it into an html file and try to open it using IE9 and FF but nothing shows up. Any idea what I might be missing?
http://code.google.com/apis/youtube/iframe_api_reference.html#Getting_Started
One thing that can help is making sure your page is rendered in standards mode by declaring it as <!doctype html>. However, that does not seem to fix all circumstances where the embed fails to load. (For example, it also doesn't like to load if the containing element isn't displayed.)
Works for me only after deleting browser history.
So I'm guessing it may have something to do with resource de-allocation of some sort (although, I would expect the IE's Javascript interpreter to do it).