hansgeerdink wrote:
Excuse me,

But, Mr. Bruno, IMHO, have you ever tried your code?

Of course, see:
http://1t3xt.info/examples/results/in_action/chapter09/peace.pdf
This is a test file for all known languages.
As you can see Hindic languages can't be rendered correctly.
There's also a problem with exotic languages such as Aramaic
because I don't have a font program to draw the glyphs.

Have been puzzling for a week now, asked a Java expert to help, still your
code does NOT display polish characters correctly.

That's not an excuse. Many developers on this list have succeeded.

I need to stamp a form
with database data over multiple pages, have you got any way of telling the
Stamper to write in a certain code page?

How can you not define a code page?
You create a BaseFont, don't you?

You defend your design approach so
fearsly, but I (with me others) find is strange that a document writes out
all existing writers created earlier in a program by document.close() I
thought in java we would code according to standards like MVC, which to my
opinion would lead to some sort of wrapper class instead of a close()
methode...

That doesn't work if you create documents with 150,000+ pages.
Believe me, that's not unusual.

Anyway, I believe me we have tried all possible code examples, variants etc.

If you would like to put out Polish I believe (sorry, I know..) you should
write in code page windows-1250, Cp1250, ISO-8859-2 or UTF-8....

Yes, you need another code page.

Please can you explain how and perhaps most important, why it is not
possible to write out a PDF in Polish on an operating system (windows) with
native language of say Dutch or English.

It's not because it doesn't work for you that it doesn't work for me.

Seriously, I have to get this working and was not able too in a weeks time,
pulling just about all my hair.... for my employer it is way more cheaper to
just go out and buy a package like PDFing or set up a decent apache web
server serving pdf documents... So what's up with the internationalization
and the java code ones run anywhere...
And yes, I have read most of the book (first edition) and also read your
explaination on design strategy, however your code for producing Polish text
just is NOT working at all at my (and apparently lots of others too...) at
all.

See the attachment. I've copy pasted the code you forwarded,
and guess what: IT WORKS!!!

Attachment: polish.pdf
Description: Adobe PDF document

import java.io.FileOutputStream;
import java.io.IOException;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Font;
import com.lowagie.text.Paragraph;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfWriter;


public class Polish {

        public static void main(String[] args) throws IOException, 
DocumentException {
                Document document = new Document();
                PdfWriter.getInstance(document, new 
FileOutputStream("polish.pdf"));
                document.open();
                BaseFont bf = BaseFont.createFont("c:/windows/fonts/arial.ttf", 
                BaseFont.CP1250, BaseFont.EMBEDDED);
                Font font = new Font(bf, 12);
                String polish = "\u0104\u0105\u0106\u0107\u0118\u0119";
                document.add(new Paragraph(polish, font));
                document.close();
        }
}
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to