I don't know what to think. The AIX pdf has some good text in msgothic and the garbled text is vector drawn, it's not a font. That's means that it doesn't reach the drawString(). Does it show correctly in AIX awt screen?
> -----Original Message----- > From: Justin Yesudasan [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 18, 2005 5:30 PM > To: Paulo Soares; [email protected] > Subject: RE: [iText-questions] iText output is garbled on > Japanese AIX, works on Windows > > Thanks for the response, attached are output from windows and AIX > we are using iText1.3.4 and SUN 1.4.2 on windows and IBM 1.4.1 on AIX > > > >From: "Paulo Soares" <[EMAIL PROTECTED]> > >To: "Jus" > <[EMAIL PROTECTED]>,<[email protected]> > >Subject: RE: [iText-questions] iText output is garbled on > Japanese AIX, > >works on Windows > >Date: Tue, 18 Oct 2005 16:32:18 +0100 > > > >I only have windows so it will always work for me. Post one of those > >garbled PDFs. > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On > Behalf Of Jus > > > Sent: Tuesday, October 18, 2005 2:22 PM > > > To: [email protected] > > > Subject: [iText-questions] iText output is garbled on > > > Japanese AIX, works on Windows > > > > > > we are using legacy AWT code and converting that to PDF using > > > iText, initially > > > we had problems once we tried to render a PDF that had > > > contents in Japanese. To > > > get it to work on windows the following was done.. we had > > > written a class that > > > implements FontMapper.. all it does is > > > public BaseFont awtToPdf(Font font) { > > > try { > > > //return BaseFont.createFont("arialuni.ttf", > > > BaseFont.IDENTITY_H, true); > > > > > > //OR > > > return BaseFont.createFont("msgothic.ttc,2", > > > BaseFont.IDENTITY_H, true); > > > > > > } > > > catch (Exception e) { > > > e.printStackTrace(); > > > throw new ExceptionConverter(e); > > > } > > > } > > > The arialunit.ttf, msgothic.ttc are available within > > > application... in windows > > > this works fine, but on AIX the output is garbled.. Following > > > is sample sketch > > > code that generates PDF... > > > > > > Document document = new Document(PageSize.A4.rotate(), 72, > > > 72, 72, 72); > > > > > > PdfWriter writer = PdfWriter.getInstance(document, new > > > FileOutputStream(workDir > > > + fileName)); > > > document.open(); > > > > > > contentByte = writer.getDirectContent(); > > > > > > PdfTemplate template = contentByte.createTemplate(width, height); > > > > > > IndusFontMapper fontMapper = new IndusFontMapper(); > > > > > > FontFactory.registerDirectory("/u01/app/oracle/oas/9.0.4/jdk/j > > > re/lib/fonts"); > > > //No Difference > > > > > > Graphics2D g2d = template.createGraphics(width, height, > fontMapper); > > > > > > template.setWidth(width); > > > template.setHeight(height); > > > g2d.translate(printPageFormat.getImageableX(), > > > printPageFormat.getImageableY()); > > > g2d.setClip(0, 0, (int) printPageFormat.getImageableWidth(), (int) > > > printPageFormat.getImageableHeight()); > > > g2d.setPaint(Color.black); > > > > > > Font font = g2d.getFont(); > > > //g2d.setFont(new Font("Arial Unicode MS", Font.PLAIN, 12)); > > > > > > g2d.setFont(new Font("MS UI Gothic", Font.PLAIN, 12)); > > > > > > > > > report.renderPage(g2d, j); > > > g2d.dispose(); > > > contentByte.addTemplate(template, 0, 0); > > > document.newPage(); > > > contentByte.reset(); > > > > > > appreciate any response if some one has come across.. > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: > > > Power Architecture Resource Center: Free content, downloads, > > > discussions, > > > and more. http://solutions.newsforge.com/ibmarch.tmpl > > > _______________________________________________ > > > iText-questions mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
