473,503 Members | 1,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Looking for PHP code for printing function

2 New Member
I have a site project and one of the required features is to be able to print contents (only texts) on the page. It's just like a one click button and the text will be printed. My idea before was to open the text file in adobe reader and there the user can print using the adobe reader print button, but this is not a good way since the contents to be printed is only short, its actually an information of a certain furniture. So I need a PHP or Javascript code for that one-click-print-button. The contents to be printed may be specified by the "table", "div" or "form".
Oct 1 '06 #1
1 7247
ronverdonk
4,258 Recognized Expert Specialist
You cannot print using PHP (server-side program). But from PHP you can issue a JavaScript "window.print()" command to print your window (the entire window).

If you want only part(s) of it printed, you can accomplish that using a CSS (external) stylesheet with the "media=print" attribute.

Ronald :cool:
Oct 1 '06 #2

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

Similar topics

0
1744
by: Nunya D. Bidness | last post by:
If anyone is interested in testing these components goto http://www.vibrantinnovations.com/vibrantlayouttools.asp The Vibrant Layout Tools ActiveX component is a suite of tools that allow...
7
1633
by: Master of C++ | last post by:
Hello Folks, I have a programming dilemma with templates and "genericity". I can think of a few solutions, but I am not sure which one is the best in terms of genetic C++ style. Any suggestions...
5
1746
by: Hemanth | last post by:
Hello there, I'm trying to read an excel worksheet (with more than 5000 rows and 30 columns) using PHP. I'm using the "excelreader" script I found over the web -...
2
3195
by: PC User | last post by:
I found some VB code to printout a richtext field and I'm trying to adapt it to MS Access 2000. I think there might be some small changes to make the adaption between VB versions. Also my OS is...
4
6451
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
5145
by: Tom | last post by:
Does anyone know if the following kb article applies to the .NET framework 1.1? http://support.microsoft.com/?kbid=324565 It states: 'Any service that is designed to print must directly use...
2
1817
by: Teemu | last post by:
I have an application created with VB6 and now I'm converting it to VB 2005. Conversion is not so simple because printing is so much different. In my app I have Timer-component, which is creates...
21
2882
by: BWIGLEY | last post by:
Basically I've just started making a game. So far it makes an array 25 by 20 and tries to make five rooms within it. In scr_make_room() there's parse errors: 20 C:\c\Rooms\Untitled1.c parse error...
1
1678
by: srinivasarv | last post by:
Dear Friends, kindly help me in correcting the following code This code is for printing the report from the combo box after selection which connects to different reports as selected. I have...
3
2600
by: Andrew Meador | last post by:
I have a button on my form to "Print". I would like to create an HTML file, of the output, and call the Explorer...Print function when this "Print" button is clicked. How can I do this - the...
0
7086
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
7280
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
7330
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
7460
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
4672
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
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1512
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 ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.