Connecting Tech Pros Worldwide Help | Site Map

Printing

  #1  
Old August 27th, 2008, 07:05 PM
sheldonlg
Guest
 
Posts: n/a
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.
  #2  
Old August 27th, 2008, 07:25 PM
Joost Diepenmaat
Guest
 
Posts: n/a

re: Printing


sheldonlg <sheldonlgwrites:
Quote:
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/
  #3  
Old August 28th, 2008, 03:45 PM
fred
Guest
 
Posts: n/a

re: Printing


On Aug 27, 2:15 pm, Joost Diepenmaat <jo...@zeekat.nlwrote:
Quote:
sheldonlg <sheldonlgwrites:
Quote:
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.
>
Quote:
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.
>
Quote:
It would be best if there were a confirmation window for the list
enabling a choice of printer.
>
Quote:
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).
>
Quote:
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.
  #4  
Old August 28th, 2008, 04:45 PM
Captain Paralytic
Guest
 
Posts: n/a

re: Printing


On 28 Aug, 15:39, fred <fred.h...@gmail.comwrote:
Quote:
On Aug 27, 2:15 pm, Joost Diepenmaat <jo...@zeekat.nlwrote:
>
>
>
>
>
Quote:
sheldonlg <sheldonlgwrites:
Quote:
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.
>
Quote:
Quote:
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.
>
Quote:
Quote:
It would be best if there were a confirmation window for the list
enabling a choice of printer.
>
Quote:
Quote:
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).
>
Quote:
Quote:
Any help would be appreciated.
>
Quote:
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.
>
Quote:
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.
>
Quote:
Alternatively, you may be able to generate PDF or some other format
that gives you more control over the resuling pages.
>
Quote:
--
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.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing from an ASP.NET page Brett answers 18 July 21st, 2008 03:15 AM
Safe Printing Jody Gelowitz answers 9 November 22nd, 2005 07:49 AM
Safe Printing Jody Gelowitz answers 9 November 20th, 2005 11:48 AM
C# .NET web application - printing the forms Suzanka answers 4 November 16th, 2005 06:17 AM
Safe Printing Jody Gelowitz answers 9 July 21st, 2005 12:48 PM