...
Codeblock |
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-barcode</artifactId>
<version>x.x.x</version>
</dependency>
|
Using the Java DSL
First you have to initialize the barcode data fomat class. You can use the default constructor, or one of parameterized. The default values are:
...
Codeblock |
// QR-Code default
DataFormat code = new BarcodeDataFormat();
|
If you want to use zxing hints, you can use the 'addToHintMap' method of your BarcodeDataFormat instance:
Codeblock |
code.addToHintMap(DecodeHintType.TRY_HARDER, Boolean.true);
|
For possible hints, please consult the xzing documentation.
Marshalling
Codeblock |
from("direct://code")
.marshal(code)
.to("file://barcode_out");
|
...