本文整理汇总了Java中org.krysalis.barcode4j.impl.code128.Code128Bean类的典型用法代码示例。如果您正苦于以下问题:Java Code128Bean类的具体用法?Java Code128Bean怎么用?Java Code128Bean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Code128Bean类属于org.krysalis.barcode4j.impl.code128包,在下文中一共展示了Code128Bean类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: barCode
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
public PaymentPdfBuilder barCode(final String barCodeMessage,
final float x,
final float y) throws IOException {
final float scale = 100f / BAR_CODE_DPI;
final Code128Bean code128Bean = new Code128Bean();
code128Bean.setCodeset(Code128Constants.CODESET_C);
code128Bean.setMsgPosition(HumanReadablePlacement.HRP_NONE);
code128Bean.setBarHeight(scale * BAR_CODE_HEIGHT_MM);
final BitmapCanvasProvider canvas = new BitmapCanvasProvider(
BAR_CODE_DPI, BufferedImage.TYPE_BYTE_BINARY, false, 0);
code128Bean.generateBarcode(canvas, barCodeMessage);
canvas.finish();
final PDImageXObject pdImage = LosslessFactory.createFromImage(pdfDocument, canvas.getBufferedImage());
try (final PDPageContentStream contentStream = new PDPageContentStream(
pdfDocument, pdfDocument.getPage(0), PDPageContentStream.AppendMode.APPEND, true)) {
contentStream.drawImage(pdImage, x, y, scale * pdImage.getWidth(), scale * pdImage.getHeight());
}
return this;
}
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:24,代码来源:HunterPaymentPdfFeature.java
示例2: getBarcode128
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
public static Image getBarcode128(String value) {
AbstractBarcodeBean barcode = new Code128Bean();
value = BarcodeString.getBarcodeStringCode128(value);
barcode.setMsgPosition(HumanReadablePlacement.HRP_NONE);
barcode.setModuleWidth(1.0);
barcode.setBarHeight(40.0);
barcode.setFontSize(10.0);
barcode.setQuietZone(10.0);
barcode.doQuietZone(true);
return getBarcode(value, barcode);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:12,代码来源:BarcodeImage.java
示例3: BarcodeRenderer
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
public BarcodeRenderer(BarcodeType barcodeType, String code) {
switch (barcodeType) {
case CODE128 : this.barcode = new Code128Bean(); break;
case CODABAR : this.barcode = new CodabarBean(); break;
case CODE39 : this.barcode = new Code39Bean(); break;
case EAN128 : this.barcode = new EAN128Bean(); break;
case DATAMATRIX : this.barcode = new DataMatrixBean(); break;
case INT2OF5 : this.barcode = new Interleaved2Of5Bean(); break;
case PDF417 : this.barcode = new PDF417Bean(); break;
case POSTNET : this.barcode = new POSTNETBean(); break;
case EAN13 : this.barcode = new EAN13Bean(); break;
case EAN8 : this.barcode = new EAN8Bean(); break;
case UPCA : this.barcode = new UPCABean(); break;
case UPCE : this.barcode = new UPCEBean(); break;
case ROYAL_MAIL_CBC : this.barcode = new RoyalMailCBCBean(); break;
case USPS_INTELLIGENT_MAIL : this.barcode = new USPSIntelligentMailBean(); break;
}
this.code = code;
}
开发者ID:maxdelo77,项目名称:replyit-master-3.2-final,代码行数:21,代码来源:BarcodeRenderer.java
示例4: visitCode128
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
@Override
public void visitCode128(Code128Component code128)
{
barcodeBean = new Code128Bean();
evaluateCode128(code128);
setBaseAttributes(code128);
evaluateBarcodeRenderable(code128);
}
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:9,代码来源:AbstractBarcodeEvaluator.java
示例5: code128
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
public static AbstractBarcodeBean code128(TextPlacement placement) {
Code128Bean result = new Code128Bean();
result.setMsgPosition(getPlacement(placement));
result.setFontSize(5);
return result;
}
开发者ID:maxdelo77,项目名称:replyit-master-3.2-final,代码行数:8,代码来源:BarcodeFactory.java
示例6: getBarcode128
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
public static Image getBarcode128(String value) {
AbstractBarcodeBean barcode = new Code128Bean();
barcode.setMsgPosition(HumanReadablePlacement.HRP_NONE);
return getBarcode(value, barcode);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:6,代码来源:BarcodeImage.java
示例7: getBarcode128
import org.krysalis.barcode4j.impl.code128.Code128Bean; //导入依赖的package包/类
/**
*
* @param value
* @return
*/
public static Image getBarcode128(String value) {
AbstractBarcodeBean barcode = new Code128Bean();
barcode.setMsgPosition(HumanReadablePlacement.HRP_NONE);
return getBarcode(value, barcode);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:11,代码来源:BarcodeImage.java
注:本文中的org.krysalis.barcode4j.impl.code128.Code128Bean类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论