Print Window Form with high quality text
i want to print window form with high quality output text on a thermal printer anyone help me plzzzz i am in trouble plzzzzzzzzzzzzzzzz bundle of thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mubashir AjaibPosted Jun 28, 2013, 7:34 AM
Sanjeeb LenkaPosted Jun 28, 2013, 6:25 AM
it may help you
if it helps you mark it as answered
Mubashir AjaibPosted Jun 28, 2013, 5:36 AM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Printing;
namespace CGC_Order_Taker
{
public partial class Bill : Form
{
private PrintDocument printDocument1 = new PrintDocument();
public Bill()
{
printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage); InitializeComponent();
}
Bitmap memoryImage;
private void CaptureScreen()
{
Graphics myGraphics = this.CreateGraphics();
Size s = this.Size;
memoryImage = new Bitmap(s.Width * 600, s.Height * 600, myGraphics);
Graphics memoryGraphics = Graphics.FromImage(memoryImage); memoryGraphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; memoryGraphics.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, s);
}
private void printDocument1_PrintPage(System.Object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(memoryImage, 0, 0);
}
public void label6_Click(object sender, EventArgs e)
{
CaptureScreen();
printDocument1.Print();
this.Close();
}
}
}
Mubashir AjaibPosted Jun 28, 2013, 5:32 AM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Printing;
namespace CGC_Order_Taker
{
public partial class Bill : Form
{
private PrintDocument printDocument1 = new PrintDocument();
public Bill()
{
printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage); InitializeComponent();
}
Bitmap memoryImage;
private void CaptureScreen()
{
Graphics myGraphics = this.CreateGraphics();
Size s = this.Size;
memoryImage = new Bitmap(s.Width * 600, s.Height * 600, myGraphics);
Graphics memoryGraphics = Graphics.FromImage(memoryImage); memoryGraphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; memoryGraphics.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, s);
}
private void printDocument1_PrintPage(System.Object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(memoryImage, 0, 0);
}
public void label6_Click(object sender, EventArgs e)
{
CaptureScreen();
printDocument1.Print();
this.Close();
}
}
}
Sanjeeb LenkaPosted Jun 28, 2013, 5:11 AM
http://social.msdn.microsoft.com/Forums/vstudio/en-US/69301374-425d-4f7e-a11b-aab4c520f962/increasing-print-quality-of-images
if any problem reply
if it helps you mark it as answered
Bhabani prasad DashPosted Jun 28, 2013, 5:07 AM
Mubashir AjaibPosted Jun 28, 2013, 5:06 AM
Bhabani prasad DashPosted Jun 28, 2013, 5:01 AM
Mubashir AjaibPosted Jun 28, 2013, 4:54 AM
Bhabani prasad DashPosted Jun 28, 2013, 4:50 AM