Hi,
We use license aspose total for Java.
And we are facing this production issue.
We are writing barcode of strings upto a 8 character length in docx.
The problem is the last digit of the barcode is chopped off from the docx. This happens when the program runs in a unix environment.
In my local workspace, there is no such issue
The jar version is aspose-barcode-6.8.0-java.
The attached png would show the barcode being cut off. The actual barcode string should be S0010970
Here is the code snippet
public void writeBarcodeAspose(File file, String contentStreamMimeType, String barcode) throws ActorException {
String barcodeTemp = “”;
BarCodeBuilder bb = new BarCodeBuilder(barcode, Symbology.Code39Standard);
bb.setBarHeight(10);
try {
barcodeTemp = File.createTempFile(“barcode”, “.tmp”).getAbsoluteFile().toString();
bb.save(barcodeTemp, BarCodeImageFormat.Bmp);
writeDocument(file, barcodeTemp);
} catch (IOException ioe) {
throw new ActorException(“IO Exception thrown while creating temporary file for barcode”, ioe, “writeBarcodeAspose”, ActorModule.HTML_INPUT_PROCESSING);
} finally{
FileUtils.deleteQuietly(new File(barcodeTemp));
}
}