In Safari 5.1 and the most recent versions of WebKit the embedding of PDF's in the HTML tags OBJECT or EMBED fail (at least under Lion) and display the message "Missing plugin". In earlier versions of Safari (5.0x and lower) this worked like a charm. This is a major issue for us, because our software relies heavily on this and there are not alternatives available for Lion yet (Acrobat PDF plugin not supported onder OS X 10.7 Lion). It seems that the embedded PDF viewer only displays PDF's that are loaded directly into a page correctly, but not those embedded in the OBJECT and/or EMBED tags. Example of code: < object data="file.pdf" width="80%" height="80%" type="application/pdf" >Object embed not supported by this browser < /object > or: < embed src="file.pdf" width="80%" height="80%" >< /embed > Example of website that shows the issue: http://blogs.adobe.com/pdfdevjunkie/2007/08/using_the_html_embed_tag_to_di.html
<rdar://problem/9816330>
I sure hope that either you guys at Webkit, or Apple, fix this issue. It's driving me nuts, to say the least.
This largely works in nightlies already. One exception is the latter example, where <embed> doesn't have a type. Patch forthcoming.
Created attachment 110552 [details] proposed fix
Comment on attachment 110552 [details] proposed fix View in context: https://bugs.webkit.org/attachment.cgi?id=110552&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:336 > + || (parameters.mimeType.isEmpty() && parameters.url.string().lower().endsWith(".pdf"))) This should check the path component of the url rather than the whole string.
Committed <http://trac.webkit.org/changeset/97167>.
Great, it works partially. Only thing missing now are the zoom, download and page forward/back buttons when a PDF is loaded. I assume that these will be visible when Mac OS X 10.7.2 is launched?