472,374 Members | 1,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 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 8255
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

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.