All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
fr.w3blog.zpl.model.element.ZebraBarCode39 Maven / Gradle / Ivy
package fr.w3blog.zpl.model.element;
import fr.w3blog.zpl.model.PrinterOptions;
import fr.w3blog.zpl.utils.ZplUtils;
/**
* Element to create a bar code 39
*
* Zpl command : ^B3 and ^BY
*
* @author ttropard
*
*/
public class ZebraBarCode39 extends ZebraBarCode {
private boolean checkDigit43 = false;
public ZebraBarCode39(int positionX, int positionY, String text, int barCodeHeigth) {
super(positionX, positionY, text, barCodeHeigth);
}
public ZebraBarCode39(int positionX, int positionY, String text, int barCodeHeigth, int barCodeWidth, int wideBarRatio) {
super(positionX, positionY, text, barCodeHeigth, barCodeWidth, wideBarRatio);
}
public ZebraBarCode39(int positionX, int positionY, String text, int barCodeHeigth, int barCodeWidth, int wideBarRatio, boolean checkDigit43) {
super(positionX, positionY, text, barCodeHeigth, barCodeWidth, wideBarRatio);
this.setCheckDigit43(checkDigit43);
}
public ZebraBarCode39(int positionX, int positionY, String text, int barCodeHeigth, boolean showTextInterpretation, boolean showTextInterpretationAbove) {
super(positionX, positionY, text, barCodeHeigth, showTextInterpretation, showTextInterpretationAbove);
}
@Override
public String getZplCode(PrinterOptions printerOptions) {
StringBuilder zpl = getStartZplCodeBuilder();
zpl.append(ZplUtils.zplCommandSautLigne("B3", zebraRotation.getLetter(), checkDigit43, barCodeHeigth, showTextInterpretation, showTextInterpretationAbove));
zpl.append("^FD");
zpl.append(text);
zpl.append(ZplUtils.zplCommandSautLigne("FS"));
return zpl.toString();
}
public boolean isCheckDigit43() {
return checkDigit43;
}
public ZebraBarCode39 setCheckDigit43(boolean checkDigit43) {
this.checkDigit43 = checkDigit43;
return this;
}
}