MohamedSaeed / xdocreport

Automatically exported from code.google.com/p/xdocreport
1 stars 0 forks source link

Problem with polish letters - convert odt to pdf #394

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Java code:
InputStream in = new FileInputStream(new File("/path/to/file/template.odt"));
            OdfTextDocument document = OdfTextDocument.loadDocument(in);
            PdfOptions options = PdfOptions.create().fontEncoding("utf-8");
            OutputStream out = new FileOutputStream(new File("/path/to/file/result.pdf"));
            PdfConverter.getInstance().convert(document, out, options);

What is the expected output? What do you see instead?
The polish letters are missing in pdf file

What version of the product are you using? On what operating system?
odt.converters-1.0.4
Red Hat Enterprise Linux Server release 5.5 

Please provide any additional information below.

Original issue reported on code.google.com by jurek.ju...@gmail.com on 28 Apr 2014 at 12:52

Attachments:

GoogleCodeExporter commented 9 years ago
Have you checked that, polish letters are installed in your server?

Original comment by angelo.z...@gmail.com on 28 Apr 2014 at 3:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Do you mean to check locale ?

LANG=pl_PL.UTF-8 
LC_CTYPE="pl_PL.UTF-8" 
LC_NUMERIC="pl_PL.UTF-8" 
LC_TIME="pl_PL.UTF-8" 
LC_COLLATE="pl_PL.UTF-8" 
LC_MONETARY="pl_PL.UTF-8" 
LC_MESSAGES="pl_PL.UTF-8" 
LC_PAPER="pl_PL.UTF-8" 
LC_NAME="pl_PL.UTF-8" 
LC_ADDRESS="pl_PL.UTF-8" 
LC_TELEPHONE="pl_PL.UTF-8" 
LC_MEASUREMENT="pl_PL.UTF-8" 
LC_IDENTIFICATION="pl_PL.UTF-8

fonts with polish chars are installed, but don't work

Original comment by jurek.ju...@gmail.com on 5 May 2014 at 11:33

GoogleCodeExporter commented 9 years ago
I have also noticed that the fonts (which are installed on server) used in 
template after conversion are changed to another one, and I think it could be a 
problem

Original comment by jurek.ju...@gmail.com on 8 May 2014 at 9:08

GoogleCodeExporter commented 9 years ago
Do you have any idea to resolve this problem? I would be grateful for your 
reply.

Original comment by jurek.ju...@gmail.com on 15 May 2014 at 11:31

GoogleCodeExporter commented 9 years ago
I'm not a big expert with installation of font.

@Pascal could you help us about this topic please. Thank's!

Original comment by angelo.z...@gmail.com on 15 May 2014 at 11:46

GoogleCodeExporter commented 9 years ago
To install fonts with iText, you can put all your font in a folder and register 
the fonts with :

 com.lowagie.text.FontFactory.registerDirectory(fontFolder);

This is what we have done in this sample :

https://code.google.com/p/xdocreport/source/browse/REST-Service-Converter-WebApp
lication/src/main/java/fr/opensagres/demo/RegisterFontFactorytListener.java?repo
=samples&name=master

Pascal, coul you add this information in the wiki at  :

 * https://code.google.com/p/xdocreport/wiki/XWPFConverterPDFViaIText
 * https://code.google.com/p/xdocreport/wiki/ODFDOMConverterPDFViaIText

Thank's!

Original comment by angelo.z...@gmail.com on 4 Jun 2014 at 2:14