Jump to content
JasperReports Library 7.0 is now available ×

[Urgnt] PDF Charset Problem HELP!


2005 IR Help

Recommended Posts

By: Ivan Codarin - codarin

[urgnt] PDF Charset Problem HELP!

2004-12-08 03:23

Dear All,

I've an urgent problem. I'm using iReport to create PDF pages downloadable from the web through Jsp.

Usually I produce:

1- JSP page for a draft view of data to be printed (without using jasperreports or other tools)

2- a PDF printout produced with iReport (and JasperReports).

 

I encounter problems with accent characters (like è¬) and also with apostrophe (quotes) like '....

This happens because the users writes the texts on MS Word before posting into my web forms... then with COPY + PASTE the transfer the texts on the web.

 

Word's autocorrection-feature changes the normal quote like ' in a more "beautyful" but non standard quote....

 

 

My report.xml begins with <?xml... encode="ISO-8859-1"> .... so I hope to have the same encoding....

 

 

Now...

(1) If I call my JSP page from Mozilla Firefox to see the draft page the quote ' is OK, it is readable and all is fine (I use postgresql with LATIN1 encoding)

 

(2) When the user produces the PDF to print it out for the same data in the PDF the quote disappears (causing also an "english error"...).

 

I have to print out all this things (200pages) for tomorrow, have you an idea on how can I correct this.

 

I'm using a linux box, I tryed to set the system locale to Italian for example... but this doesn't work for iReport... Now I'm trying to inform JVM that I wanna to work with a different charset but I'm not sure how to do this....

 

 

Many many thanks

Ivan

 

 

 

 

By: Ivan Codarin - codarin

RE: [urgnt] PDF Charset Problem HELP!

2004-12-08 05:54

Hi, yes I marked the textfield as PDF EMBEDDED and with CP1252... but I cannot see the ' character....

 

Thank you

I'm disoriented...

 

Ivan

 

 

 

 

By: Ivan Codarin - codarin

RE: [urgnt] PDF Charset Problem HELP!

2004-12-08 07:59

Dear All, I'm very disorented!

Now I changed my system locale, my JVM file.encoding...

 

If I export the same report at the same time for the same data in HTML format my linux browser (firefox) will show all the characters correctly:

For example:

Ginevras intelligence

 

the quote between Ginevra and the "s" is my problem.

 

If I use JrViewer or the PDF exporter will be a little square or it will disappear....

 

I hope in your help!

Thanks

 

 

 

 

By: kc - kckckc

RE: [urgnt] PDF Charset Problem HELP!

2004-12-09 02:37

hmm I don't think I really understand your problem.. In my case is use 'UTF-8' for xml and for the textfields I use CP1252 (Western Europe) and I can see al the special characters : 鬨,...

 

 

 

 

 

 

By: kc - kckckc

RE: [urgnt] PDF Charset Problem HELP!

2004-12-08 05:15

Have you marked the textfields in Ireport as PDF embedded with PDF encoding as CP1252 (Western European ANSI aka WinAnsi).

This helped me as I had to produce French texts and without this encoding the è£haracters didn't show... Hope this helps..

 

Kristof

 

 

 

 

 

By: Ivan Codarin - codarin

RE: [urgnt] PDF Charset Problem HELP!

2004-12-09 03:04

Dear Kristof ,

are you able to print out in PDF format the character at HTML code ""?

 

This is the quote that for me doesn't work....

Thanks

Ivan

 

 

 

 

By: kc - kckckc

RE: [urgnt] PDF Charset Problem HELP!

2004-12-09 04:28

So you are not having problems with the Textfields but with the Static text... I don't use html code for my static text instead I just insert the text like it is.. Why do you have to insert html codes ? maybe when you use a format parameter you can use the 'printWhenExpression'... When it is PDF format you print the text normal and when the format = html you print it with the html code ()..

Hope this helps

 

 

 

 

By: Ivan Codarin - codarin

RE: [urgnt] PDF Charset Problem HELP!

2004-12-09 04:57

Hi,

no it's a misunderstanding...

I wanna only give you a way to see the character I cannot display in PDF. This character corresponds to te on the browser... I do not use it on my report!

 

I don't know if you see this... the char is: ?

 

Regards

Ivan

 

 

 

 

By: kc - kckckc

RE: [urgnt] PDF Charset Problem HELP!

2004-12-09 06:40

Hello

so you want to have the possibility to print html OR pdf ? Then I suggest what I told you before

mainly using the printWhenExpression... If it's html print the and when it's PDF print ' directly without html-code...

 

 

 

 

By: Ivan Codarin - codarin

RE: [urgnt] PDF Charset Problem HELP!

2004-12-09 07:03

Hello,

no... I simply need to print the character ' in PDF.

 

 

I cannot show you perfectly that char because it isn't in my keyboard... and I know that it corresponds to that HTML code ... In this way you can see it.

 

That char is autoformatted by MS word when my users enter the field values.

 

Thanks

Ivan

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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