Example #1
0
        public static byte[] CreateFeedData(Emulation emulation)
        {
            byte[] data       = Encoding.UTF8.GetBytes("Hello World.");
            byte[] dataWithLf = Encoding.UTF8.GetBytes("Hello World.\n");

            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.Append(data);
            builder.AppendLineFeed();

            builder.AppendLineFeed(data);

            builder.Append(data);
            builder.AppendLineFeed(2);

            builder.AppendLineFeed(data, 2);

            builder.Append(data);
            builder.AppendUnitFeed(64);

            builder.AppendUnitFeed(data, 64);

            builder.Append(dataWithLf);

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            builder.EndDocument();

            return(builder.Commands);
        }
Example #2
0
        public static byte[] CreateCharacterSpaceData(Emulation emulation)
        {
            byte[] data = Encoding.UTF8.GetBytes("Hello World.");

            ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation);

            builder.BeginDocument();

            builder.AppendCharacterSpace(0);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(1);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(2);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(3);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(4);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(5);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(6);
            builder.AppendLineFeed(data);
            builder.AppendCharacterSpace(7);
            builder.AppendLineFeed(data);

            builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed);

            builder.EndDocument();

            return(builder.Commands);
        }