public override void Append3inchTextReceiptData(ICommandBuilder builder, bool utf8)
        {
            string encoding;

            if (utf8)
            {
                encoding = "UTF-8";

                builder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = "Windows-1252";

                builder.AppendCodePage(CodePageType.CP1252);
            }

            builder.AppendInternational(InternationalType.Spain);

            builder.AppendCharacterSpace(0);

            builder.AppendAlignment(AlignmentPosition.Center);

            builder.AppendMultiple(Encoding.GetEncoding(encoding).GetBytes("BAR RESTAURANT EL POZO\n"), 2, 2);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                               "C/.ROCAFORT 187 08029 BARCELONA\n" +
                               "NIF :X-3856907Z  TEL :934199465\n"));

            builder.AppendAlignment(AlignmentPosition.Left);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                               "------------------------------------------------\n" +
                               "MESA: 100 P: - FECHA: YYYY-MM-DD\n" +
                               "CAN P/U DESCRIPCION  SUMA\n" +
                               "------------------------------------------------\n" +
                               " 4     3,00      JARRA  CERVEZA            12,00\n" +
                               " 1     1,60      COPA DE CERVEZA            1,60\n" +
                               "------------------------------------------------\n" +
                               "                           SUB TOTAL :     13,60\n"));

            builder.AppendAlignment(AlignmentPosition.Right);

            builder.AppendMultipleHeight(Encoding.GetEncoding(encoding).GetBytes("TOTAL:     13,60 EUROS\n"), 2);

            builder.AppendAlignment(AlignmentPosition.Left);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                               "NO: 000018851  IVA INCLUIDO\n" +
                               "------------------------------------------------\n"));

            builder.AppendAlignment(AlignmentPosition.Center);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                               "**** GRACIAS POR SU VISITA! ****\n" +
                               "\n"));

            builder.AppendBarcode(Encoding.GetEncoding("ASCII").GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
        }
Exemple #2
0
        public void AppendDotImpact3inchTextReceiptData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = Encoding.GetEncoding("Windows-1252");

                commandBuilder.AppendCodePage(CodePageType.CP1252);
            }

            commandBuilder.AppendInternational(InternationalType.France);

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

//          commandBuilder.Append(encoding.GetBytes("[If loaded.. Logo1 goes here]\n"));
//
//          commandBuilder.AppendLogo(LogoSize.Normal, 1);

            commandBuilder.AppendMultipleHeight(encoding.GetBytes("Star Micronics Communications\n"), 2);

            commandBuilder.Append(encoding.GetBytes("AVENUE LA MOTTE PICQUET\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Left);

            commandBuilder.Append(encoding.GetBytes("------------------------------------------\n" +
                                                    "Date: MM/DD/YYYY    Heure: HH:MM\n" +
                                                    "Boutique: OLUA23    Caisse: 0001\n" +
                                                    "Conseiller: 002970  Ticket: 3881\n" +
                                                    "------------------------------------------\n" +
                                                    "\n" +
                                                    "Vous avez été servi par : Souad\n" +
                                                    "\n" +
                                                    "CAC IPHONE\n" +
                                                    "3700615033581 1 X 19.99€            19.99€\n" +
                                                    "\n" +
                                                    "dont contribution environnementale :\n" +
                                                    "CAC IPHONE                           0.01€\n" +
                                                    "------------------------------------------\n" +
                                                    "1 Piéce(s) Total :                  19.99€\n" +
                                                    "Mastercard Visa  :                  19.99€\n" +
                                                    "\n" +
                                                    "Taux TVA    Montant H.T.   T.V.A\n" +
                                                    "  20%          16.66€      3.33€\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.Append(encoding.GetBytes("Merci de votre visite et. à bientôt.\n" +
                                                    "Conservez votre ticket il\n" +
                                                    "vous sera demandé pour tout échange.\n"));
        }
        public override void AppendDotImpact3inchTextReceiptData(ICommandBuilder builder, bool utf8)
        {
            string encoding;

            if (utf8)
            {
                encoding = "UTF-8";

                builder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = "Shift_JIS";

                builder.AppendCodePage(CodePageType.CP932);
            }

            builder.AppendInternational(InternationalType.Japan);

            builder.AppendAlignment(AlignmentPosition.Center);

            builder.AppendEmphasis(true);

            builder.AppendMultipleHeight(Encoding.GetEncoding(encoding).GetBytes("スター電機\n修理報告書 兼領収書\n"), 2);

            builder.AppendEmphasis(false);

            builder.AppendAlignment(AlignmentPosition.Left);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                               "------------------------------------------\n" +
                               "発行日時:YYYY年MM月DD日HH時MM分\n" +
                               "TEL:054-347-XXXX\n" +
                               "\n" +
                               "        イケニシ  シズコ  サマ\n" +
                               " お名前:池西  静子 様\n" +
                               " 御住所:静岡市清水区七ツ新屋\n" +
                               "     536番地\n" +
                               " 伝票番号:No.12345-67890\n" +
                               "\n" +
                               " この度は修理をご用命頂き有難うございます。\n" +
                               " 今後も故障など発生した場合はお気軽にご連絡ください。\n" +
                               "\n" +
                               "品名/型名      数量      金額      備考\n" +
                               "------------------------------------------\n" +
                               "制御基板         1      10,000     配達\n" +
                               "操作スイッチ       1       3,800     配達\n" +
                               "パネル          1       2,000     配達\n" +
                               "技術料          1      15,000\n" +
                               "出張費用         1       5,000\n" +
                               "------------------------------------------\n" +
                               "\n" +
                               "                       小計       \\ 35,800\n" +
                               "                       内税       \\  1,790\n" +
                               "                       合計       \\ 37,590\n" +
                               "\n" +
                               " お問合わせ番号  12345-67890\n"));
        }
        public void AppendDotImpact3inchTextReceiptData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = Encoding.GetEncoding("Windows-1252");

                commandBuilder.AppendCodePage(CodePageType.CP1252);
            }

            commandBuilder.AppendInternational(InternationalType.Spain);

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

//          commandBuilder.Append(encoding.GetBytes("[If loaded.. Logo1 goes here]\n"));
//
//          commandBuilder.AppendLogo(LogoSize.Normal, 1);

            commandBuilder.AppendMultipleHeight(encoding.GetBytes("BAR RESTAURANT EL POZO\n"), 2);

            commandBuilder.Append(encoding.GetBytes("C/.ROCAFORT 187 08029 BARCELONA\n" +
                                                    "NIF :X-3856907Z  TEL :934199465\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Left);

            commandBuilder.Append(encoding.GetBytes("------------------------------------------\n" +
                                                    "MESA: 100 P: - FECHA: YYYY-MM-DD\n" +
                                                    "CAN P/U DESCRIPCION  SUMA\n" +
                                                    "------------------------------------------\n" +
                                                    " 4 3,00 JARRA  CERVEZA               12,00\n" +
                                                    " 1 1,60 COPA DE CERVEZA               1,60\n" +
                                                    "------------------------------------------\n" +
                                                    " SUB TOTAL :                         13,60\n" +
                                                    "                     TOTAL:    13,60 EUROS\n" +
                                                    "NO: 000018851  IVA INCLUIDO\n" +
                                                    "------------------------------------------\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.Append(encoding.GetBytes("**** GRACIAS POR SU VISITA! ****\n"));
        }
        public void AppendTextLabelData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
//              encoding = Encoding.ASCII;
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.CP998);
            }

            commandBuilder.AppendInternational(InternationalType.USA);

            commandBuilder.AppendCharacterSpace(0);

            commandBuilder.AppendUnitFeed(20 * 2);

            commandBuilder.AppendMultipleHeight(2);

            commandBuilder.Append(encoding.GetBytes("Star Micronics America, Inc."));

            commandBuilder.AppendUnitFeed(64);

            commandBuilder.Append(encoding.GetBytes("65 Clyde Road Suite G"));

            commandBuilder.AppendUnitFeed(64);

            commandBuilder.Append(encoding.GetBytes("Somerset, NJ 08873-9997 U.S.A"));

            commandBuilder.AppendUnitFeed(64);

            commandBuilder.AppendMultipleHeight(1);
        }
        public override void AppendTextLabelData(ICommandBuilder builder, bool utf8)
        {
            string encoding;

            if (utf8)
            {
                encoding = "UTF-8";

                builder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = "Shift_JIS";

                builder.AppendCodePage(CodePageType.CP932);
            }

            builder.AppendInternational(InternationalType.Japan);

            builder.AppendCharacterSpace(0);

            builder.AppendUnitFeed(20 * 2);

            builder.AppendMultipleHeight(2);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("〒422-8654"));

            builder.AppendUnitFeed(64);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("静岡県静岡市駿河区中吉田20番10号"));

            builder.AppendUnitFeed(64);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("スター精密株式会社"));

            builder.AppendUnitFeed(64);

            builder.AppendMultipleHeight(1);
        }
        public override void AppendPasteTextLabelData(ICommandBuilder builder, string pasteText, bool utf8)
        {
            string encoding;
            if (utf8)
            {
                encoding = "UTF-8";

                builder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = "ASCII";

                builder.AppendCodePage(CodePageType.CP998);
            }

            builder.AppendInternational(InternationalType.USA);

            builder.AppendCharacterSpace(0);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(pasteText));
        }
        public override void AppendTextLabelData(ICommandBuilder builder, bool utf8)
        {
            string encoding;

            if (utf8)
            {
                encoding = "UTF-8";

                builder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = "ASCII";

                builder.AppendCodePage(CodePageType.CP998);
            }

            builder.AppendInternational(InternationalType.USA);

            builder.AppendCharacterSpace(0);

            builder.AppendUnitFeed(20 * 2);

            builder.AppendMultipleHeight(2);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("Star Micronics America, Inc."));

            builder.AppendUnitFeed(64);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("65 Clyde Road Suite G"));

            builder.AppendUnitFeed(64);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("Somerset, NJ 08873-3485 U.S.A"));

            builder.AppendUnitFeed(64);

            builder.AppendMultipleHeight(1);
        }
Exemple #9
0
        public void AppendPasteTextLabelData(ICommandBuilder commandBuilder, string text, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = Encoding.GetEncoding("Shift_JIS");

                commandBuilder.AppendCodePage(CodePageType.CP932);
            }

            commandBuilder.AppendInternational(InternationalType.Japan);

            commandBuilder.AppendCharacterSpace(0);

            commandBuilder.Append(encoding.GetBytes(text));
        }
        public void AppendPasteTextLabelData(ICommandBuilder commandBuilder, string text, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
//              encoding = Encoding.ASCII;
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.CP998);
            }

            commandBuilder.AppendInternational(InternationalType.USA);

            commandBuilder.AppendCharacterSpace(0);

            commandBuilder.Append(encoding.GetBytes(text));
        }
        public void AppendEscPos3inchTextReceiptData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = Encoding.GetEncoding("Windows-1252");

                commandBuilder.AppendCodePage(CodePageType.CP1252);
            }

            commandBuilder.AppendInternational(InternationalType.Germany);

            commandBuilder.AppendCharacterSpace(0);

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.AppendMultiple(encoding.GetBytes("STAR\n" +
                                                            "Supermarkt\n"), 2, 2);

            commandBuilder.Append(encoding.GetBytes("\n" +
                                                    "Das Internet von seiner\n" +
                                                    "genussvollsten Seite\n" +
                                                    "\n"));

            commandBuilder.AppendMultipleHeight(encoding.GetBytes("www.Star-EMEM.com\n"), 2);

            commandBuilder.Append(encoding.GetBytes("Gebührenfrei Rufnummer:\n"));

            commandBuilder.AppendEmphasis(encoding.GetBytes("08006646701\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Left);

            commandBuilder.Append(encoding.GetBytes("------------------------------------------\n"));

            commandBuilder.AppendEmphasis(encoding.GetBytes("                                       EUR\n"));

            commandBuilder.Append(encoding.GetBytes("Schmand 24%                           0.42\n" +
                                                    "Kefir                                 0.79\n" +
                                                    "Haarspray                             1.79\n" +
                                                    "Gurken ST                             0.59\n" +
                                                    "Mandelknacker                         1.59\n" +
                                                    "Mandelknacker                         1.59\n" +
                                                    "Nussecken                             1.69\n" +
                                                    "Nussecken                             1.69\n" +
                                                    "Clemen.1kg NZ                         1.49\n" +
                                                    "2X\n" +
                                                    "Zitronen ST                           1.18\n" +
                                                    "4X\n" +
                                                    "Grapefruit                            3.16\n" +
                                                    "Party Garnelen                        9.79\n" +
                                                    "Apfelsaft                             1.39\n" +
                                                    "Lauchzw./Schl.B                       0.49\n" +
                                                    "Butter                                1.19\n" +
                                                    "Profi-Haartrockner                   27.99\n" +
                                                    "Mozarella 45%                         0.59\n" +
                                                    "Mozarella 45%                         0.59\n" +
                                                    "Bruschetta Brot                       0.59\n" +
                                                    "Weizenmehl                            0.39\n" +
                                                    "Jodsalz                               0.19\n" +
                                                    "Eier M braun Bod                      1.79\n" +
                                                    "Schlagsahne                           1.69\n" +
                                                    "Schlagsahne                           1.69\n" +
                                                    "\n" +
                                                    "Rueckgeld                        EUR  0.00\n" +
                                                    "\n" +
                                                    "19.00% MwSt.                         13.14\n" +
                                                    "NETTO-UMSATZ                         82.33\n" +
                                                    "------------------------------------------\n" +
                                                    "KontoNr:  0551716000 / 0 / 0512\n" +
                                                    "BLZ:      58862159\n" +
                                                    "Trace-Nr: 027929\n" +
                                                    "Beleg:    7238\n" +
                                                    "------------------------------------------\n" +
                                                    "Kas: 003/006    Bon  0377 PC01 P\n" +
                                                    "Dat: 30.03.2015 Zeit 18:06:01 43\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.Append(encoding.GetBytes("USt–ID:    DE125580123\n" +
                                                    "\n"));

            commandBuilder.AppendEmphasis(encoding.GetBytes("Vielen dank\n" +
                                                            "für Ihren Einkauf!\n" +
                                                            "\n"));

//          commandBuilder.AppendBarcode(encoding      .GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
//          commandBuilder.AppendBarcode(Encoding.ASCII.GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
            commandBuilder.AppendBarcode(Encoding.UTF8.GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
        }
Exemple #12
0
        public void Append2inchTextReceiptData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = Encoding.GetEncoding("Windows-1252");

                commandBuilder.AppendCodePage(CodePageType.CP1252);
            }

            commandBuilder.AppendInternational(InternationalType.France);

            commandBuilder.AppendCharacterSpace(0);

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.AppendMultipleHeight(encoding.GetBytes("Star Micronics Communications\n"), 2);

            commandBuilder.Append(encoding.GetBytes("AVENUE LA MOTTE PICQUET\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Left);

            commandBuilder.Append(encoding.GetBytes("--------------------------------\n" +
                                                    "Date   : MM/DD/YYYY\n" +
                                                    "Heure  : HH:MM\n" +
                                                    "Boutique: OLUA23    Caisse: 0001\n" +
                                                    "Conseiller: 002970  Ticket: 3881\n" +
                                                    "--------------------------------\n" +
                                                    "\n" +
                                                    "Vous avez été servi par : Souad\n" +
                                                    "\n" +
                                                    "CAC IPHONE\n" +
                                                    "3700615033581 1 X 19.99€  19.99€\n" +
                                                    "\n" +
                                                    "dont contribution\n" +
                                                    " environnementale :\n" +
                                                    "CAC IPHONE                 0.01€\n" +
                                                    "--------------------------------\n" +
                                                    "1 Piéce(s) Total :        19.99€\n" +
                                                    "Mastercard Visa  :        19.99€\n" +
                                                    "\n" +
                                                    "Taux TVA    Montant H.T.   T.V.A\n" +
                                                    "  20%          16.66€      3.33€\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.Append(encoding.GetBytes("Merci de votre visite et.\n" +
                                                    "à bientôt.\n" +
                                                    "Conservez votre ticket il\n" +
                                                    "vous sera demandé pour\n" +
                                                    "tout échange.\n" +
                                                    "\n"));

//          commandBuilder.AppendBarcode(encoding      .GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
//          commandBuilder.AppendBarcode(Encoding.ASCII.GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
            commandBuilder.AppendBarcode(Encoding.UTF8.GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
        }
Exemple #13
0
        public void Append3inchTextReceiptData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = Encoding.GetEncoding("Shift_JIS");

                commandBuilder.AppendCodePage(CodePageType.CP932);
            }

            commandBuilder.AppendInternational(InternationalType.Japan);

            commandBuilder.AppendCharacterSpace(0);

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.AppendEmphasis(true);

            commandBuilder.AppendMultipleHeight(encoding.GetBytes("スター電機\n"), 3);

            commandBuilder.AppendMultipleHeight(encoding.GetBytes("修理報告書 兼領収書\n"), 2);

            commandBuilder.AppendEmphasis(false);

            commandBuilder.AppendAlignment(AlignmentPosition.Left);

            commandBuilder.Append(encoding.GetBytes("------------------------------------------------\n" +
                                                    "発行日時:YYYY年MM月DD日HH時MM分\n" +
                                                    "TEL:054-347-XXXX\n" +
                                                    "\n" +
                                                    "           イケニシ  シズコ   サマ\n" +
                                                    " お名前:池西 静子 様\n" +
                                                    " 御住所:静岡市清水区七ツ新屋\n" +
                                                    "     536番地\n" +
                                                    " 伝票番号:No.12345-67890\n" +
                                                    "\n" +
                                                    " この度は修理をご用命頂き有難うございます。\n" +
                                                    " 今後も故障など発生した場合はお気軽にご連絡ください。\n" +
                                                    "\n" +
                                                    "品名/型名           数量      金額    備考\n" +
                                                    "------------------------------------------------\n" +
                                                    "制御基板              1      10,000     配達\n" +
                                                    "操作スイッチ            1       3,800     配達\n" +
                                                    "パネル               1       2,000     配達\n" +
                                                    "技術料               1      15,000\n" +
                                                    "出張費用              1       5,000\n" +
                                                    "------------------------------------------------\n" +
                                                    "\n" +
                                                    "                            小計       \\ 35,800\n" +
                                                    "                            内税       \\  1,790\n" +
                                                    "                            合計       \\ 37,590\n" +
                                                    "\n" +
                                                    " お問合わせ番号  12345-67890\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            //          commandBuilder.AppendBarcode(encoding      .GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
            //          commandBuilder.AppendBarcode(Encoding.ASCII.GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
            commandBuilder.AppendBarcode(Encoding.UTF8.GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
        }
        public override void Append3inchTextReceiptData(ICommandBuilder builder, bool utf8)
        {
            string encoding;
            if (utf8)
            {
                encoding = "UTF-8";

                builder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
                encoding = "ASCII";

                builder.AppendCodePage(CodePageType.CP998);
            }

            builder.AppendInternational(InternationalType.USA);

            builder.AppendCharacterSpace(0);

            builder.AppendAlignment(AlignmentPosition.Center);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                            "Star Clothing Boutique\n" +
                            "123 Star Road\n" +
                            "City, State 12345\n" +
                            "\n"));

            builder.AppendAlignment(AlignmentPosition.Left);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                            "Date:MM/DD/YYYY                    Time:HH:MM PM\n" +
                            "------------------------------------------------\n" +
                            "\n"));

            builder.AppendEmphasis(Encoding.GetEncoding(encoding).GetBytes("SALE\n"));

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                            "SKU               Description              Total\n" +
                            "300678566         PLAIN T-SHIRT            10.99\n" +
                            "300692003         BLACK DENIM              29.99\n" +
                            "300651148         BLUE DENIM               29.99\n" +
                            "300642980         STRIPED DRESS            49.99\n" +
                            "300638471         BLACK BOOTS              35.99\n" +
                            "\n" +
                            "Subtotal                                  156.95\n" +
                            "Tax                                         0.00\n" +
                            "------------------------------------------------\n"));

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("Total                       "));

            builder.AppendMultiple(Encoding.GetEncoding(encoding).GetBytes("   $156.95\n"), 2, 2);

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                            "------------------------------------------------\n" +
                            "\n" +
                            "Charge\n" +
                            "156.95\n" +
                            "Visa XXXX-XXXX-XXXX-0123\n" +
                            "\n"));

            builder.AppendInvert(Encoding.GetEncoding(encoding).GetBytes("Refunds and Exchanges\n"));

            builder.Append(Encoding.GetEncoding(encoding).GetBytes("Within "));

            builder.AppendUnderLine(Encoding.GetEncoding(encoding).GetBytes("30 days"));

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(" with receipt\n"));

            builder.Append(Encoding.GetEncoding(encoding).GetBytes(
                            "And tags attached\n" +
                            "\n"));

            builder.AppendAlignment(AlignmentPosition.Center);

            builder.AppendBarcode(Encoding.GetEncoding("ASCII").GetBytes("{BStar."), BarcodeSymbology.Code128, BarcodeWidth.Mode2, 40, true);
        }
        public void AppendDotImpact3inchTextReceiptData(ICommandBuilder commandBuilder, bool utf8)
        {
            Encoding encoding;

            if (utf8)
            {
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.UTF8);
            }
            else
            {
//              encoding = Encoding.ASCII;
                encoding = Encoding.UTF8;

                commandBuilder.AppendCodePage(CodePageType.CP998);
            }

            commandBuilder.AppendInternational(InternationalType.USA);

            commandBuilder.AppendAlignment(AlignmentPosition.Center);

            commandBuilder.Append(encoding.GetBytes("Star Clothing Boutique\n" +
                                                    "123 Star Road\n" +
                                                    "City, State 12345\n" +
                                                    "\n"));

            commandBuilder.AppendAlignment(AlignmentPosition.Left);

            commandBuilder.Append(encoding.GetBytes("Date:MM/DD/YYYY              Time:HH:MM PM\n" +
                                                    "------------------------------------------\n" +
                                                    "\n"));

            commandBuilder.AppendEmphasis(encoding.GetBytes("SALE \n"));

            commandBuilder.Append(encoding.GetBytes("SKU             Description          Total\n" +
                                                    "300678566       PLAIN T-SHIRT        10.99\n" +
                                                    "300692003       BLACK DENIM          29.99\n" +
                                                    "300651148       BLUE DENIM           29.99\n" +
                                                    "300642980       STRIPED DRESS        49.99\n" +
                                                    "300638471       BLACK BOOTS          35.99\n" +
                                                    "\n" +
                                                    "Subtotal                            156.95\n" +
                                                    "Tax                                   0.00\n" +
                                                    "------------------------------------------\n" +
                                                    "Total                              $156.95\n" +
                                                    "------------------------------------------\n" +
                                                    "\n" +
                                                    "Charge\n" +
                                                    "159.95\n" +
                                                    "Visa XXXX-XXXX-XXXX-0123\n" +
                                                    "\n"));

            commandBuilder.AppendInvert(encoding.GetBytes("Refunds and Exchanges\n"));

            commandBuilder.Append(encoding.GetBytes("Within"));

            commandBuilder.AppendUnderLine(encoding.GetBytes(" 30 days"));

            commandBuilder.Append(encoding.GetBytes(" with receipt\n"));
        }
Exemple #16
0
        public static byte[] CreateInternationalData(Emulation emulation)
        {
            byte[] bytes = new byte[] { 0x23, 0x24, 0x40, 0x58, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x60, 0x7b, 0x7c, 0x7d, 0x7e, 0x0a };

            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.Append(Encoding.UTF8.GetBytes("*USA*\n"));
            builder.AppendInternational(InternationalType.USA);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*France*\n"));
            builder.AppendInternational(InternationalType.France);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Germany*\n"));
            builder.AppendInternational(InternationalType.Germany);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*UK*\n"));
            builder.AppendInternational(InternationalType.UK);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Denmark*\n"));
            builder.AppendInternational(InternationalType.Denmark);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Sweden*\n"));
            builder.AppendInternational(InternationalType.Sweden);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Italy*\n"));
            builder.AppendInternational(InternationalType.Italy);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Spain*\n"));
            builder.AppendInternational(InternationalType.Spain);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Japan*\n"));
            builder.AppendInternational(InternationalType.Japan);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Norway*\n"));
            builder.AppendInternational(InternationalType.Norway);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Denmark2*\n"));
            builder.AppendInternational(InternationalType.Denmark2);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Spain2*\n"));
            builder.AppendInternational(InternationalType.Spain2);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*LatinAmerica*\n"));
            builder.AppendInternational(InternationalType.LatinAmerica);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Korea*\n"));
            builder.AppendInternational(InternationalType.Korea);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Ireland*\n"));
            builder.AppendInternational(InternationalType.Ireland);
            builder.Append(bytes);

            builder.Append(Encoding.UTF8.GetBytes("*Legal*\n"));
            builder.AppendInternational(InternationalType.Legal);
            builder.Append(bytes);

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            builder.EndDocument();

            return(builder.Commands);
        }