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

Barcode Font shows in PDF, but not JRViewer


Recommended Posts

By: chris gamble - cgamble

Barcode Font shows in PDF, but not JRViewer

2003-02-17 09:51

I have managed to print a barcode on my report by putting the barcode font in the same directory as the jasper file and setting the field correctly. This works perfectly for the PDF exports, but my report needs to print directly from Jasper (either by printing or sending a JRViewer derived class.)

 

Anyone have suggestions on what I may be missing?

 

Attached is the pertinent piece of my xml design. There is not report font defined, but I have tried it as well with similar to worse results (at times the font would not show in the pdf either).

 

<font fontName="./code39.ttf" pdfFontName="./code39.ttf" size="16" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Cp1252" isStrikeThrough="false" />

 

Thanks,

 

 

 

 

By: Teodor Danciu - teodord

RE: Barcode Font shows in PDF, but not JRViewer

2003-02-17 12:35

 

Hi,

 

The "fontName" attribute should be a physical or

a logical font name.

So, it is not about specifying a path on disk.

The font has to be installed on your system and you

specify only its name.

On Windows for example, installing a font is

equivalent to copying the TTF file into the WindowsFonts directory.

 

Check the Java documentation for details about how

to work with fonts.

 

I hope this helps.

Teodor

 

 

 

 

 

By: chris gamble - cgamble

RE: Barcode Font shows in PDF, but not JRView

2003-02-17 14:57

I have installed the Barcode int /winnt/fonts and changed the report design to only include: <font fontName="code39.ttf"> Now, the barcode displays in iReports, in the PDF, but not when printed directly or showing through JRViewer. Any other ideas where I may be going wrong. (I did follow up the path of Java Fonts -- leading me to also copy it to jre/lib/fonts -- but it did not help either.)

 

Any thoughts?

 

 

 

 

By: acajax - liufenghuixue

RE: Barcode Font shows in PDF, but not JRViewer

2003-05-15 03:01

But ,on unix?

 

 

 

 

By: chris gamble - cgamble

*sigh*

2003-02-17 15:00

I seem to be without my brain. I went into winnt/fonts, and looked for the file. The installed name of my font was "Code 39" not code39.ttf etc. Im now fixed, and thanks for the information (and the reporting engine too .. its great!)

 

 

 

 

By: Ruben Misrahi - rnmisrahi

RE: *sigh*

2003-12-16 09:47

Funny. I had the same problem, but "installing" the font in Widnows/Fonts didn't help.

The only thing that solved my problem was including the Fonts directory in the Required Library paths in my application.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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