  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | IDENTITY_H : UnsupportedEncodingException | IDENTITY_H : UnsupportedEncodingException 2007-11-15 - By Guillaume Ange
Back Hello, Here is a problem that I exposed to Bruno, he told me to post here. I try to send a pdfGraphics2D to the paint method of an AWT component. Everything works fine except that the text does not appear in PDF for characters outside BaseFont.CP1252 subset. It is a problem of encoding, the FontMapper, in awtToPdf always use CP1252 as subset. I've tried to use the IDENTITY_H subset, as I think it will solve my problem, but I got this exception : java.io.UnsupportedEncodingException: Identity-H at java.lang.StringCoding.encode(Unknown Source) at java.lang.String.getBytes(Unknown Source) at com.lowagie.text.pdf.PdfEncodings.convertToBytes(PdfEncodings.java :195) at com.lowagie.text.pdf.Type1Font.<init>(Type1Font.java:280) at com.lowagie.text.pdf.BaseFont.createFont(BaseFont.java:513) at com.lowagie.text.pdf.BaseFont.createFont(BaseFont.java:438) at com.lowagie.text.pdf.BaseFont.createFont(BaseFont.java:385) Is it a bug ? Am I in the wrong way ? Thanks for your help.
Hello,<br>Here is a problem that I exposed to Bruno, he told me to post here. <br>I try to send a pdfGraphics2D to the paint method of an AWT component.<br >Everything works fine except that the text does not appear in PDF for characters outside BaseFont.CP1252 subset.<br>It is a problem of encoding, the FontMapper, in awtToPdf always use CP1252 as subset.<br>I've tried to use the IDENTITY_H subset, as I think it will solve my problem, but I got this exception : <br>java.io.UnsupportedEncodingException: Identity-H<br> at java.lang.StringCoding.encode(Unknown Source)<br> at java .lang.String.getBytes(Unknown Source)<br> at com.lowagie.text .pdf.PdfEncodings.convertToBytes(PdfEncodings.java :195)<br> at com.lowagie.text.pdf.Type1Font.<init> (Type1Font.java:280)<br> at com.lowagie.text.pdf.BaseFont .createFont(BaseFont.java:513)<br> at com.lowagie.text.pdf .BaseFont.createFont(BaseFont.java:438)<br> at com.lowagie.text.pdf.BaseFont.createFont(BaseFont.java :385)<br>Is it a bug ?<br>Am I in the wrong way ?<br>Thanks for your help.<br>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|
 |