The PDF417 format supports by default the codepage 437. Other codepages are possible with the ECI protocol but not all readers can decode it. iText doesn't support directly the ECI protocol but you are free to produce the codewords needed to make it work.
Paulo > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Javier González > Sent: Thursday, February 15, 2007 6:59 AM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] extended ascii characters don´t > work with BarcodePDF417 > > Hi, I have a problem printing extended ascii characters in > BarcodePDF417. > Some characters like Å, ƒ, ½, ¬,... don´t print inside the barcode. > > My code creates an image in 2 dimensions, with text that > includes these > especial characters. > Is there any solution for encoding these characters with > BarcodePDF417 > class from iText? > This is my code example: > > // Crea imágenes con los codigos de barras y las superpone > // en la capa superior del documento, en las coordenadas adecuadas > public void carga_codigo_puntos(String campo,String valor) throws > Exception{ > try{ > float coordenadas[] = form.getFieldPositions(campo); > if ((coordenadas==null) || (coordenadas.length==0)) return; > > valor = valor.replace('Ñ','#'); > valor = valor.replace('ñ','#'); > > // Crea codigo y asigna propiedades > BarcodePDF417 code = new BarcodePDF417(); > code.setText(valor); > > for (int i=0;i+5<=coordenadas.length;i=i+5) { > // Convierte a imagen > // Obtiene la capa superior de la plantilla abierta > int pagina = (new Float(coordenadas[i])).intValue(); > PdfContentByte cb = stamp.getOverContent(pagina); > Image imagen = code.getImage(); > // Posiciona la imagen en la capa superior... > cb.addImage(imagen, coordenadas[i+3]-coordenadas[i+1], 0, 0, > coordenadas[i+4]-coordenadas[i+2], coordenadas[i+1], > coordenadas[i+2]); > } > > } catch(Exception e){ > Log.error("Error cargando valor en CODIGO DE PUNTOS en > plantilla PDF",e); > throw new Exception(e.getMessage()); > } > } > > Anybody can help me? > Thanks in advance > > Javier González > > > > > > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the > chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge > &CID=DEVDEV > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ > Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/