473,320 Members | 1,990 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,320 software developers and data experts.

Printing in ASP.Net (Client/Server side)

ap
Hi, It is a quick question...

Is that impossible to print the page(Web Form .aspx file) in client side
using GDI+ like

PrintDocument pd = new PrintDocument();
pd.print();

As I know it is a server side printing... and is that possible to make it
to client side printing or it must be printed using javascript??

Thank you so much

AP
Nov 18 '05 #1
7 8390
With HTML output, you do not have much control on how things are printed
(JavaScript will not help much in that regard). You are for the most part
at the will of the web browser. If you want more control, then send the
output as PDF document as one example.
--
Peter O'Reilly
Nov 18 '05 #2
ap
"Peter O'Reilly" <Pe***********@timeinc.com!N!O!.S!P!AM!> wrote in message news:<OX*************@tk2msftngp13.phx.gbl>...
With HTML output, you do not have much control on how things are printed
(JavaScript will not help much in that regard). You are for the most part
at the will of the web browser. If you want more control, then send the
output as PDF document as one example.

Is the PDF generated in server side and send it back to the client side to print???
Nov 18 '05 #3
> Is the PDF generated in server side and send it back to the client side to
print???

Yes, correct. You need a third party tool to create the Portable Document
Format (PDF) file. One place to start is Adobe software.
--
Peter O'Reilly
Nov 18 '05 #4
i saw some additional printing software from www.smartertrader.net called
print manager seemed like it could be useful. i think it worked with
crystals pdfs. that may help you
"ap" <af********@hotmail.com> wrote in message
news:36**************************@posting.google.c om...
Hi, It is a quick question...

Is that impossible to print the page(Web Form .aspx file) in client side
using GDI+ like

PrintDocument pd = new PrintDocument();
pd.print();

As I know it is a server side printing... and is that possible to make it
to client side printing or it must be printed using javascript??

Thank you so much

AP

Nov 18 '05 #5
In article <36**************************@posting.google.com >, ap
<af********@hotmail.com> writes
As I know it is a server side printing... and is that possible to make it
to client side printing or it must be printed using javascript??


Sorry for late respone....

There was a method of server side printing to a shared printer in a
domain in ASP that used WSH to achieve its result. I've long ago lost
the details, but wondered if there was anything similar in .Net? What I
want to achieve is for a user to be able to enter some details of a
received item and have a ticket/docket print out to attach to the item.
The printer will be attached to a print server (jet direct type) on the
network (Intranet)

P.
--
Paul
Nov 18 '05 #6
You can print whatever custom information you want, including text
from controls, using javascript. You can open up a window with
javascript from the ASP.Net Page. Write what you want to print to the
window. Then have a link to print that window. Add the javascript into
the head on the ASP.NET page in the design view's HTML tab.

<script language =javascript>
function PrintResults()
{
var sOption="toolbar=yes,location=no,directories=yes,m enubar=yes,";
sOption+="scrollbars=yes,width=750,height=600,left =100,top=25";

var sWinHTML = document.getElementById('MyTextBox').innerHTML;

var winprint=window.open("","",sOption);
winprint.document.open();
winprint.document.write("<HTML><Head></Head><Body>")
winprint.document.write("<a href='javascript:;'
onClick='window.print();return false'>Print This Page.</a><br>");
winprint.document.write(sWinHTML);
winprint.document.write("</Body></HTML>")
winprint.document.close();
winprint.focus();
}
</script>

Paul <pa**@hotmail.com.invalid> wrote in message news:<zx**************@eyeore.home>...
In article <36**************************@posting.google.com >, ap
<af********@hotmail.com> writes
As I know it is a server side printing... and is that possible to make it
to client side printing or it must be printed using javascript??


Sorry for late respone....

There was a method of server side printing to a shared printer in a
domain in ASP that used WSH to achieve its result. I've long ago lost
the details, but wondered if there was anything similar in .Net? What I
want to achieve is for a user to be able to enter some details of a
received item and have a ticket/docket print out to attach to the item.
The printer will be attached to a print server (jet direct type) on the
network (Intranet)

P.

Nov 18 '05 #7
In article <2c*************************@posting.google.com> , Howard
Rothenburg <hr******@bcpl.net> writes
You can print whatever custom information you want, including text
from controls, using javascript. You can open up a window with
javascript from the ASP.Net Page. Write what you want to print to the
window. Then have a link to print that window. Add the javascript into
the head on the ASP.NET page in the design view's HTML tab.


Again sorry for late response.... I've been away.

Thanks for the advice and code snippet.

--
Paul
Nov 18 '05 #8

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

Similar topics

10
by: Brian Hanson | last post by:
Hi, I am trying to programmatically print a pdf file via an asp.net application. I have seen other postings that mention the following code used or something similar to it in a vb.net app. ...
6
by: ccg | last post by:
I am trying to print a file from an ASP script but haven't been able to find any way of making this happen. I have an EPL (Eltron Thermal Printer language) file that is being generated from the...
3
by: aniljain50 | last post by:
Hi All, I have a web form. let's say it has 3 fields. Employee No, Name ansd salary. Now my problem is I want to print the contents of this screen to a local printer. Note that this is client side...
2
by: Ryan Moran | last post by:
Hi, I am writing a ASP.NET application using VB.NET and everything is hunky dorey except for one thing. I am having real problems printing to a printer on the client side. I need to be able...
6
by: Darren | last post by:
Guys, Based on selection in a datagrid,I need to retrieve info to construct a letter from a table in my database and send it off for printing.Now the thing is there may be a few hundred letters...
2
by: cFleury | last post by:
Hello, I am new to ASP.NET and I have to print an invoice from an application written in ASP.NET, I have followed most of the threads in this newsgroup about the dificulties posed by the server...
2
by: Jacek | last post by:
I'm developing ASP.NET C# application. I need to implement server-side printing for asp.net form on specified in DB printer. I know how to print it on Client-side (window.print()). How can I print...
4
by: Lucas Ponzo | last post by:
Hi All, I have an ASP.NET 2.0 app. The users access the pages, uniquely via pocket pc ... I need to print a page. But I need that the page print on a printer installed on the web server...
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
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.