Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8763447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:46:59+00:00 2026-06-13T15:46:59+00:00

I am developing a system for supermarket which will prints pos bill after invoicing

  • 0

I am developing a system for supermarket which will prints pos bill after invoicing using .net.

For the bill printing I am using System.Drawing.Printing in .net.

The issue was when the item list is too long , when it increase the one page limit pos printer only prints the first page and cut paper.

Following is the code sample for printing which I used. Please help me to solve this.

Private Sub printInvoice()

     Dim printDocument As New PrintDocument
     Dim printController As New StandardPrintController
     printDocument.PrintController = printController
     AddHandler printDocument.PrintPage, AddressOf PrintDocumnet_Event
     printDocument.Print()

End Sub

Public Sub PrintDocumnet_Event(ByVal sender As Object, ByVal e As PrintPageEventArgs)
    Try
        Dim dataFont As Font = New Font("Courier New", 9, FontStyle.Bold)
        Dim leftMargin As Integer = 15
        Dim topMargin As Integer = 65


        For Each invoiceRow As DataRow In dtInvoice.Rows
            Dim code As String = invoiceRow("Item_Code").ToString.Trim
            Dim name As String = invoiceRow("Print_Name").ToString.Trim
            Dim price As String = String.Format("{0:0.00}", Double.Parse(invoiceRow("Price"))) + "x"
            Dim qty As String = String.Format("{0:0.###}", Double.Parse(invoiceRow("Qty")))
            Dim amont As String = String.Format("{0:0.00}", Double.Parse(invoiceRow("Amount")))
            Dim discount As String = String.Format("{0:0.00}", Double.Parse(invoiceRow("Discount")))


            e.Graphics.DrawString(String.Format("{0,-8}", name), dataFont, Brushes.Black, leftMargin, topMargin)
            topMargin += 15
            e.Graphics.DrawString(String.Format("{0,-10} {1,7} {2,5} {3,8}", code, price, qty, amont), dataFont, Brushes.Black, leftMargin, topMargin)
            topMargin += 20
        Next
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:47:00+00:00Added an answer on June 13, 2026 at 3:47 pm

    Thanx for all. I found the solution. I had to check the page height according to item list and add the following when the page exceeds.

     e.HasMorePages = True 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a system in C# (.NET 4.0) which will be used by various
I'm developing an API system which requires this type of authentication. The user will
I'm developing a system which will be posting messages onto a remote MSMQ queue.
I'm developing a system which will have a PC (windows) component and an iPad
I'm developing a system in ASP.NET which needs user authentication. The authentication system should
I am developing a system in which a server will serve a video to
I am developing a system which include a server app & a client app,
I'm developing a system which needs to store videos in the form: /path/to/video/<md5 of
My team is in the process of developing a system where we're using Unity
I will be developing a system that will involve a data acquisition server where

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.