473,464 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Printing

I have been asked to implement a "Print All" function to an application.
The current screen has a list of invoices. Clicking on any one of
them (via a preview button) opens a new window for that invoice. They
can then, of course, print that document.

What they want is a single button that sends all the invoices to a
printer. Of course, each one has to look like it would when opened
singly via the preview and then printed.

It would be best if there were a confirmation window for the list
enabling a choice of printer.

I am not sure if this is php or javascript or both. I suspect it is
both (since the generation has to be pulled from database data).

Any help would be appreciated.
Aug 27 '08 #1
3 1240
sheldonlg <sheldonlgwrites:
I have been asked to implement a "Print All" function to an
application. The current screen has a list of invoices. Clicking on
any one of them (via a preview button) opens a new window for that
invoice. They can then, of course, print that document.

What they want is a single button that sends all the invoices to a
printer. Of course, each one has to look like it would when opened
singly via the preview and then printed.

It would be best if there were a confirmation window for the list
enabling a choice of printer.

I am not sure if this is php or javascript or both. I suspect it is
both (since the generation has to be pulled from database data).

Any help would be appreciated.
All you can do in javascript here is to use the print() method, which
on most browsers opens up the same dialog as selecting the "Print..."
menu option.

If you want to stay with HTML you can put all the invoices on a single
HTML file (generated via PHP) and print that - you can use CSS to
insert page breaks etc.

Alternatively, you may be able to generate PDF or some other format
that gives you more control over the resuling pages.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Aug 27 '08 #2
On Aug 27, 2:15 pm, Joost Diepenmaat <jo...@zeekat.nlwrote:
sheldonlg <sheldonlgwrites:
I have been asked to implement a "Print All" function to an
application. The current screen has a list of invoices. Clicking on
any one of them (via a preview button) opens a new window for that
invoice. They can then, of course, print that document.
What they want is a single button that sends all the invoices to a
printer. Of course, each one has to look like it would when opened
singly via the preview and then printed.
It would be best if there were a confirmation window for the list
enabling a choice of printer.
I am not sure if this is php or javascript or both. I suspect it is
both (since the generation has to be pulled from database data).
Any help would be appreciated.

All you can do in javascript here is to use the print() method, which
on most browsers opens up the same dialog as selecting the "Print..."
menu option.

If you want to stay with HTML you can put all the invoices on a single
HTML file (generated via PHP) and print that - you can use CSS to
insert page breaks etc.

Alternatively, you may be able to generate PDF or some other format
that gives you more control over the resuling pages.

--
Joost Diepenmaat | blog:http://joost.zeekat.nl/| work:http://zeekat.nl/
I used PDF for my project, but it was pretty painful... I had to make
my form resemble one that we use within the company. If I'd have been
able to get a commercial PDF library it would have been better, but I
had to write hundreds of lines to replicate the look of a single page
using a free PDF generator.

Of course, you would then reuse that page for each invoice, so it
seems worth it if you really need to control the look. Failing that,
you can designate which CSS is applied to printing.
Aug 28 '08 #3
On 28 Aug, 15:39, fred <fred.h...@gmail.comwrote:
On Aug 27, 2:15 pm, Joost Diepenmaat <jo...@zeekat.nlwrote:


sheldonlg <sheldonlgwrites:
I have been asked to implement a "Print All" function to an
application. The current screen has a list of invoices. *Clicking on
any one of them (via a preview button) opens a new window for that
invoice. *They can then, of course, print that document.
What they want is a single button that sends all the invoices to a
printer. *Of course, each one has to look like it would when opened
singly via the preview and then printed.
It would be best if there were a confirmation window for the list
enabling a choice of printer.
I am not sure if this is php or javascript or both. *I suspect it is
both (since the generation has to be pulled from database data).
Any help would be appreciated.
All you can do in javascript here is to use the print() method, which
on most browsers opens up the same dialog as selecting the "Print..."
menu option.
If you want to stay with HTML you can put all the invoices on a single
HTML file (generated via PHP) and print that - you can use CSS to
insert page breaks etc.
Alternatively, you may be able to generate PDF or some other format
that gives you more control over the resuling pages.
--
Joost Diepenmaat | blog:http://joost.zeekat.nl/|work:http://zeekat.nl/

I used PDF for my project, but it was pretty painful... I had to make
my form resemble one that we use within the company. *If I'd have been
able to get a commercial PDF library it would have been better, but I
had to write hundreds of lines to replicate the look of a single page
using a free PDF generator.
Of course you could have built the layout in HTML and then used one of
the HTML2PDF php libraries to generate your pdf files.

Aug 28 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been...
0
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are...
9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
4
by: Suzanka | last post by:
Hello, I have an application written in C# on visual studio .NET. It is a web aplication. The application consists of many different forms, that users occassionaly want to print out for filing....
4
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
0
by: nikhilgargi | last post by:
Requirement: I need to provide printing capability in a C# desktop application that I am developing The documents that need to be printed can be in Rich Text Format (RTF) or HTML. Custom...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
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:
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.