none
Windows Point of service , Font size for header RRS feed

  • Question

  • hello ,

    i have a problem for pos font size. how can i change font size ? 

    i work c# for winapp
    • Edited by gulbaris Saturday, July 15, 2017 8:22 AM
    Saturday, July 15, 2017 8:21 AM

All replies

  • What controls are u using? TextBox? RichTextBox or Label?

    Can you tell us what u have done?

    Plz show us your codes.


    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report



    Saturday, July 15, 2017 8:44 AM
  • Label

     PrintTextLine(printer, lblTicketTitle.Text.PadLeft(printer.RecLineChars / 2).ToString());

    i want change lblTicketTitle Size

    • Edited by gulbaris Saturday, July 15, 2017 8:49 AM
    Saturday, July 15, 2017 8:47 AM
  • Just make your Label.AutoSize = True. This will automatically be set according to its inner content.

    But——of course, if u insist doing that yourself, just make:

    1) AutoSize = False.

    2) Set the Label.Width, Label.Height……,ect.


    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report




    Saturday, July 15, 2017 8:49 AM
  • its not work for when i print ticket

    i work windows point of service and EpsonT88. 

    private void PrintReceiptHeader(PosPrinter printer, string companyName, string addressLine1, string addressLine2, string taxNumber, DateTime dateTime, string CommandeType)
            {
                
                Font font = new Font("Times New Roman", 12.0f);
                lblTicketTitle.Font = new Font(font,FontStyle.Bold);
                PrintTextLine(printer, lblTicketTitle.Text.PadLeft(printer.RecLineChars / 2).ToString());
                PrintTextLine(printer, String.Empty);
                //  PrintTextLine(printer, "COMMANDE");
                PrintTextLine(printer, String.Format("Comm. No : {0}", YeniTicketNo.ToString()));
                PrintTextLine(printer, String.Format("Comm. Date : {0}", dateTime.ToShortDateString()));
                PrintTextLine(printer, String.Format("Comm. Type : {0}", CommandeTypeTxt));
               // PrintTextLine(printer, taxNumber);
               // PrintTextLine(printer, new string('-', printer.RecLineChars / 2));
               
                PrintTextLine(printer, String.Empty);
                PrintText(printer, "article                  ");
                PrintText(printer, "qtt");
                PrintText(printer, "  prix");
                PrintTextLine(printer, "  Total");
                PrintTextLine(printer, new string('-', printer.RecLineChars));
               // PrintTextLine(printer, String.Empty);
            }


    • Edited by gulbaris Saturday, July 15, 2017 9:09 AM
    Saturday, July 15, 2017 9:05 AM
  • Can u send your proj onto SkyDrive for us to see (Just a demo to show your error or senario that doesn't meet your need)……?

    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report



    Saturday, July 15, 2017 9:15 AM
  • my project is not ready. i have no demo. my projet is not complete. i looked a exemple in this forum after i taked same exemple from here but i can't change font size for header. 

    just i want learn how can i using font property with windows point of service or posprinter windows. 

    • Edited by gulbaris Saturday, July 15, 2017 9:23 AM
    Saturday, July 15, 2017 9:21 AM
  • my project is not ready. i have no demo. my projet is not complete. i looked a exemple in this forum after i taked same exemple from here but i can't change font size for header. 

    just i want learn how can i using font property with windows point of service or posprinter windows. 

    No, just send us the half-made proj, that's OK because we can see what you actually did and maybe some modifications will help you.

    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report



    Saturday, July 15, 2017 9:26 AM
  • my project is not ready. i have no demo. my projet is not complete. i looked a exemple in this forum after i taked same exemple from here but i can't change font size for header. 

    just i want learn how can i using font property with windows point of service or posprinter windows. 

    What's PrintTextLine?

    I think you'd better send us your learning codes as projects for us to analyze


    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report



    Saturday, July 15, 2017 9:35 AM
  •  private void PrintTextLine(PosPrinter printer, string text)
            {
               

                if (text.Length < printer.RecLineChars)
                    printer.PrintNormal(PrinterStation.Receipt, text + Environment.NewLine); //Print text, then a new line character.
                else if (text.Length > printer.RecLineChars)
                    printer.PrintNormal(PrinterStation.Receipt, TruncateAt(text, printer.RecLineChars / 3)); //Print exactly as many characters as the printer allows, truncating the rest, no new line character (printer will probably auto-feed for us)
                else if (text.Length == printer.RecLineChars)
                    printer.PrintNormal(PrinterStation.Receipt, text); //Print text, no new line character, printer will probably auto-feed for us.
            }
    Saturday, July 15, 2017 9:38 AM
  • Where did u get "PosPrinter"? Can u share the link?

    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report



    Saturday, July 15, 2017 9:41 AM
  •  private PosPrinter GetReceiptPrinter()
            {
                PosExplorer posExplorer = new PosExplorer(this);
                DeviceInfo receiptPrinterDevice = posExplorer.GetDevice("PosPrinter", "EPSONPOS"); //May need to change this if you don't use a logicial name or use a different one.
                return (PosPrinter)posExplorer.CreateInstance(receiptPrinterDevice);
            }
    Saturday, July 15, 2017 9:43 AM
  • In order to quickly solve your problem instead of "One Answer for One Question" to waste time. A better way is that you can send the code onto SkyDrive for us to see after downloading your learning project.

    ASP.NET Forum
    StackOverFlow
    FreeRice Donate
    Issues to report



    Saturday, July 15, 2017 9:50 AM