[jboss-user] [JBoss Seam] - pdf - font encoding and documentation

pczekaj do-not-reply at jboss.com
Sat Feb 10 11:05:01 EST 2007


I'm using Seam 1.1.6GA. In documentation - 15.9. Configuring iText - there is no information about need of DocumentStoreServlet in web.xml. Without it useExtensions option doesn't work. There should be some option to set encoding for text, without it i can't display polish national charachters (there are simply missing in pdf). I've made quick change to org.jboss.seam.pdf.ui.UIFont :

  |     public void createITextObject(FacesContext context) {
  |         familyName = (String) valueBinding(context, "familyName", familyName);
  |         int family = (familyName==null) ? Font.UNDEFINED :  Font.getFamilyIndex(familyName);        
  |         
  |         BaseFont baseFont = null;
  |         try {
  |         	baseFont = BaseFont.createFont("Helvetica", BaseFont.CP1250,
  |         			BaseFont.NOT_EMBEDDED);
  |         } catch (DocumentException e) {
  |         	//TODO: what to do?
  |         } catch (IOException e) {
  |         	//TODO: what to do?
  |         }
  |         
  |         size = (Integer) valueBinding(context, "size", size);
  |         //font = new Font(family, size);
  |         font = new Font(baseFont, size);
  |         
  |         style = (String) valueBinding(context, "style", style);
  |         if (style != null) {
  |             font.setStyle(style);
  |         }
  |     }
  | 
with that change all polish national characters are visible. More elegant solution would be great...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014158#4014158

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014158



More information about the jboss-user mailing list