I searched a lot on google and did not find what I really wanted. I got the following code that will print a variable name. I have an Epson Dot Matrix printer and roll paper (endless continuous paper).
My problem is that after printing the namepaper feed is up to size A4. I do not want paper feed. This application is designed to print receipts that will have unlimited data, which must be printed flawlessly (with page violation).
Can you smart people point me in the right direction to these codes? edited this code and changed the script .. please move down
private void pd_PrintPage(object sender, PrintPageEventArgs e)
{
Font Heading2 = new Font("Times New Roman", 13);
StringFormat sf = new StringFormat();
sf.LineAlignment = StringAlignment.Near;
sf.Alignment = StringAlignment.Center;
PaperSize pkCustomSize1 = new PaperSize("First custom size", 100, 200);
pd.DefaultPageSettings.PaperSize = pkCustomSize1;
e.Graphics.DrawString(name.ToString(), Heading1, Brushes.Black, e.MarginBounds.Left + (e.MarginBounds.Width / 2), e.MarginBounds.Top, sf);
}
1: - @Adriano Repetti , #. , . .
2: - , page Height, line height, , . .
3: - @Adriano Repetti Raw Printing ( ) . bin pastie.org (, ). , , . .
PrintDocument pdoc = new PrintDocument();
pdoc.DefaultPageSettings.PaperSize.Height = 300;
pdoc.Print();
private void pd_PrintPage(object sender, PrintPageEventArgs e)
{
Font Heading2 = new Font("Times New Roman", 13);
TextRenderer.DrawText(e.Graphics, "My name in local language is വിനീത്", Heading2, new Point(0, 0), Color.Black);
}
, , unicode .
TextRenderer.DrawText with unicode support without form feeding ? , . , . ...
EDIT 4: , , . ( . → → Epson LX-300 + → → → / → → → BOOOOOM ). Epson LX-300+. , ? ?