|
Hi everyone!
I'm looking many hours for solution to my problem and I have
not found what I need
So if you can please help me
I can't get polish characters in generated pdf
file.
I'm parsing xhtml file as below:
Document document = new Document();
pdfw = PdfWriter.getInstance( document, new FileOutputStream("..\\webapps\\bank1\\files\\pdf\\aa.pdf")); SAXParser parser =
SAXParserFactory.newInstance().newSAXParser();
Reader reader = new
InputStreamReader(new
FileInputStream( "c:\\t2.htm"), BaseFont.CP1250); parser.parse(new InputSource(reader), htmlH); everything is good when im adding text like
this:
BaseFont bfComic =
BaseFont.createFont("c:\\winnt\\fonts\\comicbd.ttf", BaseFont.CP1250,
BaseFont.NOT_EMBEDDED);
Font font = new Font(bfComic, 12); String text1 = "This is the quiteęęęąąąą True Type font 'Comic'."; document.add(new Paragraph(text1, font)); polish chars are in pdf
but when I'm parsing html there is no polish chars
my html headers are:
<?xml version="1.0"
encoding="iso-8859-2"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> thank you for any help
adam
|
