Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<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:

...

Code Block
// QR-Code default
DataFormat code = new BarcodeDataFormat();

If you want to use zxing hints, you can use the 'addToHintMap' method of your BarcodeDataFormat instance:

Code Block
code.addToHintMap(DecodeHintType.TRY_HARDER, Boolean.true);

For possible hints, please consult the xzing documentation.

Marshalling

Code Block
from("direct://code")
  .marshal(code)
  .to("file://barcode_out");

...