Google
Google
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
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
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&#39;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>&nbsp;&nbsp;&nbsp; at
java.lang.StringCoding.encode(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at java
.lang.String.getBytes(Unknown Source)<br>&nbsp;&nbsp;&nbsp; at com.lowagie.text
.pdf.PdfEncodings.convertToBytes(PdfEncodings.java
:195)<br>&nbsp;&nbsp;&nbsp; at com.lowagie.text.pdf.Type1Font.&lt;init&gt;
(Type1Font.java:280)<br>&nbsp;&nbsp;&nbsp; at com.lowagie.text.pdf.BaseFont
.createFont(BaseFont.java:513)<br>&nbsp;&nbsp;&nbsp; at com.lowagie.text.pdf
.BaseFont.createFont(BaseFont.java:438)<br>
&nbsp;&nbsp;&nbsp; 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/