Categories

CODE
Visual C++ Programming
C++ (Non Visual C++ Issues)
Modern Windows Apps (Metro)
C++ and WinAPI
Managed C++ and C++/CLI
Visual C++ Bugs & Fixes
Graphics Programming
Multithreading
Network Programming
Driver Development
Visual Basic 6.0 Programming
Visual Basic .NET
Crystal Reports
C-Sharp Programming
Managed C++
Visual Basic .NET
ASP.NET
.NET Framework
ADO.NET
Windows Presentation Foundation (WPF) & XAML forum
Silverlight
.NET Installation and Configuration Issues
Java Programming
AJAX
Scripting - Client Side
Database
XML
Wireless/Mobile Development
Assembly
Scripting - Server Side (PHP, Perl, etc.)
Python
General Developer Topics
Project Planning, Design, and Management
Testers and Testing
Algorithms & Data Structures
General Discussion / Chit Chat
Announcements, Press Releases, & News
Feedback
Articles Suggestions
Testing Area
Programming Projects
C# Game(s) Project
Game Engine Project
C++ Coding Project
Project: Code War
Slow Chat: Talk with Microsoft Developer Teams
Slow Chat: Developing Multithreaded Applications
Slow Chat: C++0x
Slow Chat: Visual C++: Yesterday, Today, and Tomorrow
Directory Services
General Windows and DNA Programming
Windows OS Issues
Open Positions (Jobs)
Looking for Work
Visual Basic .NET FAQs
Visual Basic FAQs
CodeGuru Individual FAQs
CodeGuru Individual Visual Basic FAQs

Resources

Java Database
Linux
Coding
Mobile
Hardware
Software Development
Software Development
iOS,OS X
iOS,OS X
ORACLE
IBM DEVELOPER
IBM DEVELOPER
MSDN
MSDN


Tags

Scripting - Client Side

Discuss client-side scripting issues. Client-side scripting such as JavaScript, JScript, and VBScript as well as technologies such as HTML and stylesheets.

Print iframes content pdf file using javascript in safari browser


Code:  	<HTML> 	<script Language="javascript">  		function printfile() 		{  			window.frames['objAdobePrint'].focus(); 			window.frames['objAdobePrint'].print(); 		}   	</script> <BODY> 	 	<iframe src="Test.pdf" id="objAdobePrint" name="objAdobePrint" height="250" width="100&#37;" frameborder=0></iframe><br>  	<input type="button" value="Print" onclick="javascript: printfile();">  </BODY> </HTML>   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?  				  			

  				  					Is your Safari set to load PDFs in the browser? If not, then it will just download it and your iframe will be blank anyway.  				  			

  				  					yes, my safari browser its loading pdf file, but its not printing  				  			

  				  					Where exactly does it fail to print? Does the preview show correctly? Does it just not send to the printer? Does the printer dialog show up? Can you be more specific?  Because the code works perfectly fine for me.


Related Links

Popup not trigering onload event
Javascript - Change display text of Hyperlink? How?
Message from webpage
JS linking help
UTM Parameter tracking issue - please read.
window.top.location in chrome
Need help with checkbox and populating fields
Need help calling a function
Javascript: Recursion in class
[RESOLVED] Linkbox Pop Up - Browser Problems
Automatically Saving page and moving on?
Problems with exit splash script
Why doesn't this script work?
AxWebBrowser control capture DHTML (mouse) events disables browser
WSH getting path to .js-file
Help with JavaScript Code