473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

To print directly without showing the window

Hi,

I have a code like this

Expand|Select|Wrap|Line Numbers
  1. function printDocument(url) {
  2.  
  3.   var newWindow = window.open(<url>, '_blank');
  4.   newWindow.print();
  5.   setTimeout(<function name>,2000); // code for delaying to complete printing
  6.   newWindow.close();
  7. }
  8.  
Here the specified window gets opened and printed. But I actually need to just print the window(newly opened url) without showing it to the user.

I need the code for this.
Dec 6 '07 #1
1 3552
acoder
16,027 Expert Mod 8TB
But I actually need to just print the window(newly opened url) without showing it to the user.
The only thing I can think of is having the print page as part of the main page, but hidden. Use CSS print media settings to display when printing.
Dec 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Dennis Allen | last post by:
Hi. On one particular web page I want to offer the user a print button. Question. How do I create one? Something compatible with most browsers would be nice. Appreciate any advice...Dennis
2
by: Yuriy | last post by:
Hello! I need to print PDF Document by clicking a button on .aspx page. The PDF should be printed on client printer without displaing it on the window. I tried Process namespace but it doesn't...
2
by: AP No spam | last post by:
Hi I need help to Print Pdf File directly without preview from client side To solve problem I used This C# code Response.Buffer = true;
2
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
1
by: Alba López | last post by:
Hi, I want to print a webform directly to the default printer, without showing the user the print dialog box. I used to do it with window.open and it worked as I wanted to, but after installing...
1
pankil
by: pankil | last post by:
Hello, I'm a very beginner in Javascript and sorry if my question sounds stupidly. I want to print a page without showing the print window and without saving the page as a file. I want the user...
3
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
I have a asp.net page, it uses js to print in IE. It always has the prompting user window appear. I have tried: <input onclick="document.all.WebBrowser.ExecWB(6,6)" type="button"...
1
by: Saberthedream | last post by:
Hello, I am creating a crystal report in .net and i need to print the crystal report directly without showing it to user . for this i am writing code Report.PrintToPrinter(1, true, 0, 0); but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.