public static byte[] CreateFontStyleData(Emulation emulation) { byte[] data = Encoding.UTF8.GetBytes("Hello World.\n"); ICommandBuilder builder = StarIoExt.CreateCommandBuilder(emulation); builder.BeginDocument(); builder.Append(data); builder.AppendFontStyle(FontStyleType.B); builder.Append(data); builder.AppendFontStyle(FontStyleType.A); builder.Append(data); builder.AppendFontStyle(FontStyleType.B); builder.Append(data); builder.AppendCutPaper(CutPaperAction.PartialCutWithFeed); builder.EndDocument(); return(builder.Commands); }