Jump to content
We've recently updated our Privacy Statement, available here ×

Can barcode saved as PDF file in raw data format?


Recommended Posts

We have a Jasper report with a barcode. After the report was generated and saved as PDF foramt. Our printer is not able to print the barcode and it was printed as black box. The reason was that printer doesn't have any printer drivers in order to gain printing speed for automation system.

The converted PDF report would have saved the barcode as an image instead of raw data and that's why the printer cannot handle it and printed the barcode as a black box.

Do we have any options to save the barcode in raw data format when converting a Jasper report into a PDF file?


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

When I include a barcode in my reports I used the Barcode4j library which is an option within Jasper. The barcode appears fine on screen and then from my preview window I select save, choose the PDF type and then enter a filename with pdf extension. The file opens ok with PDF viewer on my mac and prints to a laser just fine.

There is a lot of code to look at by my project is at https://www.commander4j.com/ and you can download the source from there if it helps.

Are you using a barcode font by any chance ?

Link to comment
Share on other sites

  • 10 months later...

We typically simply embed the barcode font in the PDF.  Sure, it makes the PDF larger, but it's manageable and our Brother label printers seem to handle it just fine.

I've tested some Linux Driverless printing (Printer Working Group), and gotten labels to print on label printers that support a format like 'image/pwg-raster', 'application/PCLm', 'image/jpeg' or 'application/postscript'. Not played with Apples proprietary 'image/urw', but it's certainly well supported on an enormous number of printers.  Granted you may have to convert that PDF, but IIRC, the new CUPS Driverless system does that natively via filters.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...