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

CSS, Howto create a simple stylesheet for a web application

Howto create a simple stylesheet for a web application

Calculate standard deviation - c# program, Calculate Standard Deviation - C...

Calculate Standard Deviation - C# Program Hello i am unable to find the code for Calculate Standard Deviation in c#. Can anybody please provide me the assignment help?

Explain synchronous postback and asynchronous postback, What is the differe...

What is the difference among synchronous postback and asynchronous postback? The difference between synchronous and asynchronous postback is as follows: Asynchronous postbac

Need to get a windows desktop application developed, Need to get a windows ...

Need to get a windows desktop application developed Project Description: I am looking to obtain a desktop application developed. The desktop application will have the subsequ

What are the differences between ajax and javascript, What are the differen...

What are the differences between AJAX and JavaScript? The differences among AJAX and JavaScript are given as follows: AJAX sends request to the server and does not wait for

Grid view related query, i want to know how can i sum quantity column in g...

i want to know how can i sum quantity column in gridview and place it in first row...not in footer..in .net. Rply ASAP

Penny auction auto bidder software, Project Description I require a Auto...

Project Description I require a Automated penny auction bidder software (bidder robot, sniper software, Autobidder ) that put bid at specific milliseconds Nanoseconds from the e

I need scrapebox software develper, Project Description: hi i need to de...

Project Description: hi i need to develop a software scrapebox exect same with all Skills required: .NET, Java, C# Programming, Visual Basic, Visual Basic for Apps

How to prevent .net dll to be decompiled?, Prevent .NET DLL to be decompile...

Prevent .NET DLL to be decompiled By design phase .NET embeds rich Metadata inside the executable code using the MSIL. Anyone can easily  decompile DLL back using tools such as

A few changes to outloproject description, A few changes to OutloProject De...

A few changes to OutloProject Description: We require someone who is familiar with programming plug-in to work with Microsoft Outlook. Initially we just require a simple chan

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