• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Text under barcode present on screen but not present when printing

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just migrate to Java7u15, NetBeans 7.3, JasperReports 5.0 and iReports 5.0.1.

I have only one problem.

When I generate a report in iReport or in my java application, the text under the barcode (barcode4j 2.1 from JasperReports) is present on the screen or in the generated PDF file but not when printed on paper.

I tried to clean and rebuild everything...no change.

I uninstall java7u15 and installed java6u41 then everythink works fine everywhere.

I'am lost...please help.

Thanking you in advance.
 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Carlo, welcome to JavaRanch!

That's an odd problem. Are you printing the PDF to paper? If so, what program are you using to view and print the PDF?

Reinstalling Java isn't going to make a difference. The problem is going to be with the PDF settings, or possibly with how barcode4j is creating the barcode and its caption.
 
Curatolo Carlo
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use AcrobatReader 11.0.2 to open and print PDF files.

I have made some other tests last night and it is impossible to have the text under the barcode with java7 but always there with java6.

Another interresting test. I put a barbecue component on a report and the text under the barcode is always there, with java7 too.

But the text is smaller and lighter with barbecue I prefer barcode4j.

What can I do ?
 
Greg Charles
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's so bizarre that I think I must be misunderstanding something in your problem description. Let me see if I've got this all correct:

1. You create a PDF using Jasper Reports and Barcode4J under JDK 1.7. In the PDF viewed with Acrobat, you see a caption under the barcode, but when you print the PDF, the caption is gone.
2. You do the same thing with JDK 1.6, but now when you print the PDF, the caption prints as it displayed on the screen.
3. Other than the JDK, you don't change anything between these two cases. The versions of Jasper Report, Barcode4J, and any other supporting jars is exactly the same.

When you change JDKs are you also recompiling your code, and the Jasper Report jrxml file?

 
Curatolo Carlo
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.Not exact.
Is when I print from JasperView or iReport that the text Under the barcode is not on paper with java7 but present with java6

The generated PDF always contains the text and when I print from Acrobat the text is always on paper.

2. Exact

3. Exact

I tried everything. Recompile all (my application, jrxml files), partial recompile (only my application or only jrxml files) or keeping everything untouched.

Seems to me that the combinaison JasperReport, java7, barcode4j, JasperView generate that little bug...no text under a barcode when printing from the JasperView.
 
Greg Charles
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, that makes more sense. I couldn't figure out how the Java version could affect what Adobe Reader did with a PDF. JasperView is a Java application, so that's more vulnerable to changes in the JDK. I would guess there is some issue with your new JDK retrieving fonts, and it may be more related to configuration than that particular version. You might see if you can change the caption font for barcode4j to something extremely generic, like Serif. I don't know enough about barcode4j to help you more than that though. You might try the Jaspersoft Community forums at http://community.jaspersoft.com/answers for more information.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic