View Full Version : Print more than one page

10-21-2005, 05:15 PM
hello everyone,

i have a list of records getting them from a database and each record in this list take me to the same page like other records but with defferent value, ... i am trying to find a code that allow me to print all pages when i click on a button in the list page ... is there any way to do that or shall i need to print page by page ??? your help please ..

thanks in advance,

10-21-2005, 09:21 PM
You can only print one page at a time, but you could write out all the database records to a single page and print that.

hope this helps


10-22-2005, 01:29 PM
well i have done that .. i am getting all records in one page but each record is going to a page with the same layout but with different value ....

any way thanks alot martin_narg for your reply ... but i think there is a way ,,, that it allow u to print more than one page at a time

10-22-2005, 01:49 PM
... but i think there is a way ,,, that it allow u to print more than one page at a time
Unfortunately not using javascript mate. You would need to write all the records out to the same page and print that, or print each record individually. Also you could create a rich-text format file (http://www.biblioscape.com/rtf15_spec.htm) file and flush that to the browser (basically a download prompt), or even flush the output as a word document to the browser. Users can then save/print/etc that document - Because word is an html editor it would display your modified html output, it will also accept the mso-office specific styling for headers/footers/page numbers/etc. You would do this download prompt by changing the HTTP application header, more information available on request.

Hope this helps.


10-22-2005, 02:38 PM
PrintAllRecs function should create a sequence of popup windows.

Each popup window should have m-records, print itself (window.print()) to printer and close itself.

If out of sequence pages appear on printer, the process must be synchronized (setTimeout()).

10-22-2005, 05:59 PM
Nice idea mate, but will pop up endless print dialogue boxes - one per page. Also popup blockers will more than likely disable this. Also is very resource hungry!