protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); builder.Append(ZPLCommand.GD(Width, Height, BorderThickness, BorderColor, InverseLeaningDirection)); builder.Append(ZPLCommand.FS()); return(builder); }
protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); builder.Append(ZPLCommand.GB(Width, Height, BorderThickness, BorderColor, CornerRounding)); builder.Append(ZPLCommand.FS()); return(builder); }
protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); builder.Append(ZPLCommand.GF(Compression, BinaryByteCount, GraphicFieldCount, BytesPerRow, Content)); builder.Append(ZPLCommand.FS()); return(builder); }
protected virtual StringBuilder GenerateZpl(StringBuilder builder) { builder.Append(ZPLCommand.FO(PositionX, PositionY, FieldOrigin)); if (FieldReversePrint) { builder.Append(ZPLCommand.FR()); } return(builder); }
protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); string fieldDataSwitches = (char)ErrorCorrection + "A,"; builder.Append(ZPLCommand.BQ((int)QrModel, (int)MagnificationFactor, ErrorCorrection, MaskValue)); builder.Append(ZPLCommand.FD(fieldDataSwitches + Content)); builder.Append(ZPLCommand.FS()); return(builder); }
StringBuilder IZplGenerator.GenerateZpl(StringBuilder builder) { builder.Append(ZPLCommand.XA()); builder.Append(ZPLCommand.LH(PositionX, PositionY)); if (MediaLength.HasValue) { builder.Append(ZPLCommand.LL(MediaLength.Value)); } if (MediaTracking.HasValue) { builder.Append(ZPLCommand.MN(MediaTracking.Value, BlackMarkOffset)); } if (PrintWidth.HasValue) { builder.Append(ZPLCommand.PW(PrintWidth.Value)); } if (PrintMode.HasValue) { builder.Append(ZPLCommand.MM(PrintMode.Value)); } if (MediaDarknessLevel.HasValue) { builder.Append(ZPLCommand.MD(MediaDarknessLevel.Value)); } if (ReversePrintingColors) { builder.Append(ZPLCommand.LR(true)); } if (MediaType.HasValue) { builder.Append(ZPLCommand.MT(MediaType.Value)); } builder.Append(ZPLCommand.PQ(Quantity, PauseAndCutValue, ReplicatesOfEachSerialNumber, OverridePauseCount, CutOnError)); builder.Append(ZPLCommand.CI(Encoding)); builder.Append(ZPLCommand.PR(PrintSpeed, SlewSpeed, BackfeedSpeed)); Content .Cast <IZplGenerator>() .Aggregate(builder, (acc, curr) => curr.GenerateZpl(acc)); builder.Append(ZPLCommand.XZ()); return(builder); }
protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); builder.Append(ZPLCommand.FD(Content)); builder.Append(ZPLCommand.A(FontStyle, FontOrientation, CharHeight, CharWidth)); if (BlockMode) { builder.Append(ZPLCommand.FB(BlockWidth, BlockLines, BlockLineSpace, BlockAlignment)); } builder.Append(ZPLCommand.FS()); return(builder); }
protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); builder.Append(ZPLCommand.BY((int)ModuleWidth, (double)WideBarToNarrowBar, FieldHeight)); switch (BarcodeType) { case BarcodeType.Code128: builder.Append(ZPLCommand.BC(BarcodeOrientation, Height, PrintInterpretationLine, PrintInterpretationLineAboveCode, UCCCheckDigit)); break; case BarcodeType.EAN8: builder.Append(ZPLCommand.B8(BarcodeOrientation, Height, PrintInterpretationLine, PrintInterpretationLineAboveCode)); break; case BarcodeType.EAN13: builder.Append(ZPLCommand.BE(BarcodeOrientation, Height, PrintInterpretationLine, PrintInterpretationLineAboveCode)); break; case BarcodeType.UPCA: builder.Append(ZPLCommand.BU(BarcodeOrientation, Height, PrintInterpretationLine, PrintInterpretationLineAboveCode, PrintCheckDigit)); break; case BarcodeType.UPCE: builder.Append(ZPLCommand.B9(BarcodeOrientation, Height, PrintInterpretationLine, PrintInterpretationLineAboveCode)); break; case BarcodeType.Code39: builder.Append(ZPLCommand.B3(BarcodeOrientation, Mod43CheckDigit, Height, PrintInterpretationLine, PrintInterpretationLineAboveCode)); break; default: throw new InvalidOperationException("This barcode type is not supported."); } builder.Append(ZPLCommand.FD(Content)); builder.Append(ZPLCommand.FS()); return(builder); }
protected override StringBuilder GenerateZpl(StringBuilder builder) { base.GenerateZpl(builder); builder.Append(ZPLCommand.GS(FieldOrientation, Height, Width)); builder.Append(ZPLCommand.FD((Content.HasValue ? (char)Content : default).ToString()));
public void ZplCommandAndParametersAreChainedTogether() { Assert.Equal("^FO500,100,0", ZPLCommand.FO(500, 100, FieldOrigin.Left)); }