[opensuse-es] EZPDF.
Gente estoy usando la clase ezpdf para generar un pdf a partir de código PHP. Realmente anda muy bien salvo por una cosa, la justificación "full" del texto cuando hay caracteres con acentos. Tal problema lo reconoce el mismo autor de la clase, pero ahí mismo indica que al tiempo lo solucionó. Indica la forma de arreglarlo pero para texto en alemán... No he encontrado como hacerlo para texto en castellano. De casualidad alguno de ustedes ha usado esta clase? Le ha pasado esto y sabe como arreglarlo? Mientras tanto acá les pego lo que dice el manual de la clase: Does this work with accented characters ? Being a slightly ignorant english speaker I completely forgot aboutaccented characters, it is near the top of the list of things to fix up. update Nov 2002 - There has been a lot of work done on accented charcter support since the previousmessages were written, it should now be fairly useful, see the FAQ entry below on problems withaccented characters, and full justification (though this applies to any character which is outside of thenormal windows set, not just accented ones). Y aquí la solución: my accented characters do not work with full justification? yes, this is a bit of a problem, however the latest version does give you the capability to fix the problem. I beleive that it stems from some discrepancy between the character numbering in the AFM file, and that used within the various operating systems, which results in the character at the position is one which has small (or zero) width. However the latest version gives you the capability to 're- assign' character numbers to named adobe font characters (which gives you potential access to the full set), the function is an option of the font selection command and it should be documented in the pdf file. Here is the diff array for the typical german characters, which was sent to me by another guy that helped me sort this out. $diff=array(196=>'Adieresis',228=>'adieresis', 214=>'Odieresis',246=>'odieresis',220=>'Udieresis',252=>'udieresis',223=>'germandbls'); // and the first time that you call selectFont for each font, use $pdf->selectFont('<fontname>',array('encoding'=>'WinAnsiEncoding','differences'=>$diff)); Según parece hay que reasignar las posiciones de los caracteres especiales, el tema es que no sé como hacer esto para el texto en castellano. Se les ocurre algo que pueda leer? Saludos y muchas gracias, Mauro. -- Para dar de baja la suscripción, mande un mensaje a: opensuse-es+unsubscribe@opensuse.org Para obtener el resto de direcciones-comando, mande un mensaje a: opensuse-es+help@opensuse.org
participants (1)
-
Mauro Antivero