We help IT Professionals succeed at work.
Get Started

Printing longer than 21 cm receipts.

RGuillermo
RGuillermo asked
on
61 Views
Last Modified: 2019-12-01
Hello Experts
I am printing a receipt using a visual c sharp and an EPSON thermal POS printer.

In order to print the logo, I am using the following lines that work just fine.
            Bitmap bm1 = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            pictureBox1.DrawToBitmap(bm1, new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height));
            e.Graphics.DrawImage(bm1, hx, hy, wi, he);
            bm1.Dispose();

And because I used an image
I continue printing each line of text as an image
as follows.
            // text
            hy += (he+s2);wi = 300; he = 20;
            Bitmap tit1 = new Bitmap(wi,he);
            pictureBox5.DrawToBitmap(tit1, new Rectangle(0, 0, wi, he));
            e.Graphics.DrawImage(tit1, hx , hy, wi , he);
            tit1.Dispose();

The thing is most of the time I need to print several items and the printing is longer than the height of A4 paper size.
my printing is being truncated when the limit is reached.

How can I make receipts longer than the height of A4 ?
Regards,
Comment
Watch Question
The More I know, the more I don't know
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE