I need asp.net print page task, DOT NET Programming

Assignment Help:

I need asp.net print page task

Project Description:

I have a little task on asp.net, I need to print a text data to receipt printer from web page, I used the subsequent code and it works fine on my local machine:

Service service = null;

protected void Page_Load(object sender, EventArgs e)

{

try

{

ServiceFunc serv = new ServiceFunc();

service = serv.GetService(Convert.ToInt32(Session["servid"]));

printpage();

}

catch (Exception ex)

{ }

}

 

public void printpage()

{

PrintDialog pd = new PrintDialog();

PrintDocument pdoc = null;

pdoc = new PrintDocument();

Response.Write("1");

PrinterSettings ps = new PrinterSettings();

Font font = new Font("Courier New", 12);

PaperSize psize = new PaperSize("Custom", 300, 400);

pd.Document = pdoc;

pd.Document.DefaultPageSettings.PaperSize = psize;

pdoc.DefaultPageSettings.PaperSize.Height = 600;

pdoc.DefaultPageSettings.PaperSize.Width = 300;

Response.Write("2");

pdoc.PrintPage += new PrintPageEventHandler(pdoc_PrintPage);

Response.Write("3");

PrintPreviewDialog pp = new PrintPreviewDialog();

pp.Document = pdoc;

Response.Write("4");

pdoc.Print();

Response.Write("5");

}

void pdoc_PrintPage(object sender, PrintPageEventArgs e)

{

Graphics graphics = e.Graphics;

Font font = new Font("Courier New", 10);

graphics.DrawString("XXX", new Font("Courier New", 9), new SolidBrush(Color.Black), startX, startY + Offset);

}

if you have a solution or another way to print.

Skills required are .NET, ASP, Print, C# Programming


Related Discussions:- I need asp.net print page task

Developer of a asp.net mvc4 entityframework, Small website using ASP.NET MV...

Small website using ASP.NET MVC 4 EntityFramework 5 Project Description: We are seeking a developer to a ASP.NET MVC4 EntityFramework website using the subsequent tools: Visu

Counting number of words in a string - c# program, Counting Number of Words...

Counting Number of Words in a String - C# Program Anyone can suggest me the output of the following program. using System;   class CountWords { public static void

What is the meaning of object pooling, What is the meaning of object poolin...

What is the meaning of object pooling? Object pooling is a method of storing a pool (group) of objects in memory that can be reused later as needed. Whenever, a new object is n

How does cas works, How does CAS works? There are two key methods of CA...

How does CAS works? There are two key methods of CAS security policy- code groups and permissions. A code group contains assemblies in it in a manner that each .NET assembly is

I want to develop a windows 8.1 application, I want to develop a Windows 8....

I want to develop a Windows 8.1 Application Project Description: Media Player App Development for Windows 8.1 platform with brilliant UI, flexible controls and easy to use.

Extensible markup language (xml), What is XML? Extensible markup langua...

What is XML? Extensible markup language (XML) is all about describing the data. Below is a XML which describes an invoice data. Shoes   12 10

What is assembly, What is assembly? Assemblies are the building blocks ...

What is assembly? Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, a

Creating dynamic web pages, As you have probably realized by now, Web pages...

As you have probably realized by now, Web pages are much more useful when they are dynamic. In Internet terminology, the word dynamic means several things. Primarily, it refers to

Encripter-decripter application, Encripter-Decripter application Project...

Encripter-Decripter application Project Description: I want an application which can encrypt - decrypt text, images, and music files as well as videos. Skills required are

I need some a vba expert urgent, I need some a VBA expert urgent Project...

I need some a VBA expert urgent Project Description: I require a VBA expert for scraping data from internet. .NET, Excel, Data Processing, Visual Basic

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd