コード例 #1
0
ファイル: APIFunctions.cs プロジェクト: SE343TC/starprntsdk1
        public static byte[] CreateInitializationData(Emulation emulation)
        {
            byte[] data = Encoding.UTF8.GetBytes("Hello World.\n");

            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.Append(data);
            builder.AppendMultiple(2, 2);
            builder.Append(data);
            builder.AppendFontStyle(FontStyleType.B);
            builder.Append(data);
            builder.AppendInitialization(InitializationType.Command);
            builder.Append(data);

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            builder.EndDocument();

            return(builder.Commands);
        }