473,395 Members | 1,658 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,395 software developers and data experts.

Printing Issues

Frinavale
9,735 Expert Mod 8TB
Hi there,

I'm currently attempting to print a web-page at the end of a lengthy registration process.

The script I'm using is quite simple:

<body onload="window.print(); window.close();">

IE works perfectly and does what I would expect it to do. The problem I'm having is with Firefox 2.0: It will only print the first page of the web-page.

Apparently the browser is closing before it finishes the printing process (or that's what I'm assuming happens since when I leave the window open, it prints perfectly fine).

I read through a discussion posted here in the past about a similar issue to the one I'm having but didn't find it helpful for solving the problem.

There was a lot of talk about using CSS2 to create a CSS used for printing...but I simply want to print what I have customized the document to look like (since its very different from the web-page) and then want to close the window afterwards.

I'm wondering if anyone knows the reason why only one page is printing in Firefox? And if anyone knows of a way to get around this without leaving the window open after the print dialog has been closed ?

Thanks a lot for your help
-F
Dec 11 '06 #1
1 1494
acoder
16,027 Expert Mod 8TB
There's not much control of printing using JavaScript. You could try closing the window onfocus assuming that the window would receive focus after the print dialog has closed, but that wouldn't be reliable.
...but I simply want to print what I have customized the document to look like (since its very different from the web-page) and then want to close the window afterwards.
CSS is the way to go really. The whole point is you would style it differently depending on the media (screen, print, etc.). If you can customize it to look how you want it to using CSS, you don't need to open a print-friendly popup window.
Jun 6 '08 #2

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

Similar topics

12
by: memmmmm | last post by:
So I have a client program written in java and it needs to be able to print pdfs. By print pdfs I dont mean print to a pdf file but rather print a pdf file to a real printer. I have tried pdfgo and...
1
by: DCraig | last post by:
I'm having problems printing to a line printer from both Crystal Reports and SQL Server reporting services using dotnet. When I try and print a report from an application with Crystal I get the...
7
by: Dennis C. Drumm | last post by:
I was wondering if someone could suggest were/how I could get started with setting up printing of a collection of text that includes tables from a grid and other supporting information about the...
5
by: Senthil Kumar | last post by:
hi Group, Iam developing one Component in c#.It will load any kind of image either from Local machine or URL.Finally I do have options for printing and preview. While printing Iam facing the...
4
by: Russ | last post by:
To ASP.NET printing experts: My Asp.net web form needs to print some reports at the client side. I've been trying to research this and find some confusing and conflicting information in previous...
3
by: Mika M | last post by:
Hi all! I have made an application for printing simple barcode labels using PrintDocument object, and it's working fine. Barcode printer that I use is attached to the computer, and this...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
3
by: Richard MSL | last post by:
I have an application that prints documents that it creates. It uses what I believe is a standard .NET way of doing so, like this: PrintDocument pd = new PrintDocument(); pd.PrintPage += new...
3
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
Is there a way to force printing in black and white programatically?
0
by: Linda Liu[MSFT] | last post by:
Hi Al, Based on my understanding, you have an application which prints something to printers. The problem is that the font of "OCR A Extended" cannot be printed properly on some of printers. If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.