Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7708061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:30:56+00:00 2026-06-01T00:30:56+00:00

I am trying to convert binary data to pdf417 barcode using pdf417bean class of

  • 0

I am trying to convert binary data to pdf417 barcode using pdf417bean class of barcode4J. But it is giving me following error

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)

Here’s a part of codebase I am using

        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);

I am using apache commons for conversion from base 64

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:30:58+00:00Added an answer on June 1, 2026 at 12:30 am

    I tried changing Barcode4J PDF417HighLevelEncoder class and changed encoding to ISO-8859-1 in place of Cp437. I generated a handful of barcodes and they are getting scanned correctly. Looks like it can be changed to support ISO 8859-1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to convert the following but am having difficulty. Can anyone see where I'm
I am trying to send Binary data using python raw socket. For that i
I'm trying to convert a Binary file to Hexadecimal using Ruby. At the moment
I am trying to retrieve Tiff image data through COM using a StringBuilder but
i´m using subsonic 3 trying convert a SQL2008 project to MySQL. when the projects
I've been trying to convert SVG images to PNG using C#, without having to
I'm trying to convert some code that worked great in VB, but I can't
Using foundation and cocoa frameworks on Mac, I am trying to convert an NSData
The struct module is useful when you're trying to convert data to and from
I'm trying to pull some binary data from a database and write them to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.