JavaScript - Print iframes content pdf file using javascript in safari browser

Asked By Ganesan BalaKrishnan on 13-May-09 07:06 AM
<script Language="javascript">

function printfile()


<iframe src="Test.pdf" id="objAdobePrint" name="objAdobePrint" height="250" width="100%" frameborder=0></iframe><br>

<input type="button" value="Print" onclick="javascript: printfile();">


the above code working in Firefox browser, but its not working in safari browser.

if i try to print this pdf file in safari browser i am getting empty page print out.

if i open any pdf file in firefox browser, i can print that pdf file from toolbar File->Print option,
but its not working for safari browser.

any one can help me for above issue?
Santhosh N replied to Ganesan BalaKrishnan on 13-May-09 10:36 AM
Safari browser handles the pdf files seperately and it has its own viewer unlike other browsers which calls the pdf viewers to open the files...

check here for more info on how to control the viewer..
Ganesan BalaKrishnan replied to Santhosh N on 13-May-09 11:16 AM

How & where to run the following command

defaults write WebKitOmitPDFSupport -bool YES