Jump to content

Problem with barcode values in generated PDF on Red Hat Enterprise Linux


jogo

Recommended Posts

 Hi Guys,

this is my very first post here :o) We developed  a servlet, running in Tomcat 5.5 container, which consumes XML file and replies with PDF generated document.

All works fine on Windows machines. But when we deployed the war achive to the target environment, which is Red Hat Enterprise Linux Server release 5.5 (Tikanga) we discovered, that barcode values, which are usually placed at the bottom of the generated bar codes are not included in the generated PDFs on Red Hat.

The we did a bit of googling and found a bunch of good hints:

http://www.jaspersoft.com/sites/default/files/jw-presentations/JW11_JasperReports_Tips_And_Tricks_TeodorDanciu%2002.pdf

http://mdahlman.wordpress.com/2010/05/28/jaspersoft-v3-7-font-extensions/

http://grysz.com/2010/06/01/use-custom-fonts-in-jasperreports-pdf-exporter/

 

We use the recent version of Jasper Reports 4.5.1 and I discovered there is already prepared jar file containing font extension jasperreports-fonts-4.5.1.jar. So we put it on the classpath, but without any success.

So my question is, if we need to configure something else in reports (all reports use defautl SansSerif font, which is included in the extension). Do we need to specify this somewhere explicitly?

Or it is a problem of Red Hat OS? Or Java execution environment on Red Hat?

 

Any clues are very welcome. Tahnk you.

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Ok folks, today I spent some time figuring out, what is causing the issue. After validating, that the font extension is installed correctly I started looking into the report itself.

I changed type of barcode from Barbecue to Barcode4J and voila, the value was present in the generated PDF!

The Barbecue library is pretty old (last update in 2007) and JasperReporst 4.5.1 is shipped with this version.

Also in teh forum users reported the same problem:

http://sourceforge.net/projects/barbecue/forums/forum/266281/topic/4726228

 

And now I've just dicovered, there is actually a workaroud for it, straight here on the forum. So I'm gonna try it out:

http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=22849

Link to comment
Share on other sites

  • 2 years later...

If the barcode value does not change once the form is rendered, then the barcode should not disappear. However, if there is code in the "calculate" event or any event following the initial render of the form then the barcode will disappear if you have not properly Reader Extended the form.

You can experiment with this using Acrobat. Open your form in Acrobat instead of the free Adobe Reader and see if you get the same results. If it works in Acrobat but not in Reader then it's a calculate / licensing problem.

 

Link to comment
Share on other sites

  • 5 months later...

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...