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

Long hyphens (negative numbers) disappearing in PDF output


arneja

Recommended Posts

Using JasperReports 6.20.0  (also tried .3), I initially ran into issues with negative numbers being rendered without the leading hyphen (using pattern "###0.0")

Adding a bit of context so that others may be able to find this:
I thought I was only seeing this in production (Docker, jetty:10-jre11 based), not locally in Studio. After a few hours I understood it was also happening locally, but only if I saved the output to PDF. 

I think the real issue is the usage of long hyphen (em-dash), because when I inserted the same character into a static text field it disappeared in the PDF output. 

If I switch font to Dejavu Sans, it renders correctly. The file says "SansSerif", but pdffonts tells me Helvetica is being used in the output.

I am using Norwegian as my locale, in production that is

```
java.util.Locale locale = new Locale( "no", "NO" );
```

Where can I modify the locale to use a regular dash, or what other options to I have? I much prefer Helvetica to Dejavu Sans

I have temporarily set the pattern to #0.0##;(-#0.0##) , which still renders without the - , but at least with the parentheses.
 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks 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...