Я пытаюсь преобразовать двоичные данные в штрих-код pdf417, используя класс штрих-кода pdf417bean.Но это дает мне следующую ошибку
java.lang.IllegalArgumentException: Non-encodable character detected: Í (Unicode: 205)
org.krysalis.barcode4j.impl.pdf417.PDF417HighLevelEncoder.determineConsecutiveBinaryCount(PDF417HighLevelEncoder.java:468)
org.krysalis.barcode4j.impl.pdf417.PDF417HighLevelEncoder.encodeHighLevel(PDF417HighLevelEncoder.java:108)
org.krysalis.barcode4j.impl.pdf417.PDF417LogicImpl.generateBarcodeLogic(PDF417LogicImpl.java:193)
org.krysalis.barcode4j.impl.pdf417.PDF417Bean.generateBarcode(PDF417Bean.java:79)
com.pb.iop.labelgen.impl.BarcodeService.generateBarcodecodePDF417(BarcodeService.java:244)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:165)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:276)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:71)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1171)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1103)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1053)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1043)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:406)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:477)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:662)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
Вот часть кодовой базы, которую я использую
PDF417Bean bean = new PDF417Bean();
bean.doQuietZone(true);
bean.setModuleWidth(UnitConv.in2mm(moduleWidthInches));
bean.setQuietZone(UnitConv.in2mm(quietZoneInches));
bean.setBarHeight(height);
boolean antiAlias = false;
int orientation = 0;
BitmapCanvasProvider canvas = new BitmapCanvasProvider(
dpi, BufferedImage.TYPE_BYTE_BINARY, antiAlias, orientation);
indiciaData = indiciaData.replaceAll("\\s+", "");
byte[] binaryData = Base64.decodeBase64(indiciaData.getBytes());
String base64DecodedMsg = StringUtils.newStringIso8859_1(binaryData);
bean.generateBarcode(canvas, base64DecodedMsg);
canvas.finish();
String mime = MimeTypes.MIME_BMP;
out = new ByteArrayOutputStream();
final BitmapEncoder encoder = BitmapEncoderRegistry.getInstance(mime);
encoder.encode(canvas.getBufferedImage(), out, mime, dpi);
Я использую Apache Commons для преобразования из базы 64