473,325 Members | 2,774 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,325 software developers and data experts.

print out using php

134 100+
hi everybody.,

i need to get a print out of a page automatically when a button is clicked using php...

any ideas??

regards
vijay
Dec 1 '08 #1
9 6122
Markus
6,050 Expert 4TB
Use javascript.

window.print()
Dec 1 '08 #2
nathj
938 Expert 512MB
I've never been a fan of presenting the user with options that replace default functionality; it's confusing and breaks the users expectations.

If you want a page to print, then the normal print functions - CTRL+P, or File->Print would be used by the user.

If you wish to ensure it prints a certain way then use a dedicated style sheet with the media type set to 'Print'

Cheers
nathj
Dec 1 '08 #3
vjayis
134 100+
ya i knw tht., but for making a printout similar to an bill book.,

i,e printout is taken as the bill., so odynamic contents should be printed.,

any help??
Dec 2 '08 #4
nathj
938 Expert 512MB
I'm not sure I follow you now. You can use CSS to restrict what is printed and the layout of the print. So if there is something you don't want printed in the print style sheet set the display to none.
Dec 2 '08 #5
Dormilich
8,658 Expert Mod 8TB
or the other way round, if you want something printed, but not displayed set the screen display to none and the print display to inline|block (or whatever is suited).

regards
Dec 2 '08 #6
vjayis
134 100+
hi again.,

i need to take a print of all my datas which are displayed in an webpage using php.,

so i used window.print() function as suggested. but while taking printout the title and the address also gets printed in the paper..

i just need to take a print of my result without the title and address bar.,

any help??

regards
vijay
Mar 10 '09 #7
nathj
938 Expert 512MB
I'm still not sure I am with you on this one. Is there any reason why you are not using a print style sheet? Then you can control more of what is/isn't printed.
Mar 10 '09 #8
vjayis
134 100+
i removed it through page set-up.,

and while displaying datas how can we predict the page length.,

i m displaying all user details as a table with the user names as title.,

so if the details continues to the next page., the upcoming users details should be printed in the new paper..

any help
Mar 11 '09 #9
pbmods
5,821 Expert 4TB
Heya, vijay.

For the level of control that you want over your output, you should consider generating PDF files instead.
Mar 12 '09 #10

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

Similar topics

14
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version:...
4
by: Julie Siebel | last post by:
Apologies...I'm sure this has been asked before, but I can't seem to come up with the correct Google search terms. While my problem is with stylesheets, the errors are being caused by my...
1
by: Michael Beck | last post by:
I need to select one of about 15 printers, which I have been able to do. Then I need to set that printer as the printer to use, run a Crystal Reports reports, and track if/when the printing job...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
2
by: Brad Pears | last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
16
by: raylopez99 | last post by:
I am running out of printing paper trying to debug this...it has to be trivial, but I cannot figure it out--can you? Why am I not printing text, but just the initial string "howdy"? On the...
2
by: bob | last post by:
Hi, I have a page that has a collection of things which it passes to a second 'print' page using a session variable. The print page has buttons for moving though the collection and the user ...
3
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
I have an application that hosts a web browser control. I would like to detect when ever the browser tries to print a page and rather than print the document, store the print job off in a database...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.