Italian PDF Viewer & Carattere "€"

patatonj

Member
Licensed User
Longtime User
Possibile che non si possa avere il carattere "€" con questa stringa?

PDFWriter1.addText(x, y,font, "€" & prezzo)

🤷‍♂️
 

drgottjr

Expert
Licensed User
Longtime User
a seconda del set di caratteri oppure del font, prova chr(0x80) o chr(0x20AC)
 

sirjo66

Well-Known Member
Licensed User
Longtime User
..... il famoso patatonj da torino ??
VECO ??
 

LucaMs

Expert
Licensed User
Longtime User
a seconda del set di caratteri oppure del font, prova chr(0x80) o chr(0x20AC)
1577882304429.png
 

drgottjr

Expert
Licensed User
Longtime User
al tuo servizio, caro amico
 

patatonj

Member
Licensed User
Longtime User
.... che font stai utilizzando ???

utilizzo la libreria PDFWriter

questa stringa per settare il carattere
B4X:
PDFWriter1.setFont2(Fonts.SUBTYPE  , Fonts.COURIER,"UTF-8")

queste per scrivere il valore (che recupero da una query) nel pdf
B4X:
str_enc_1  = Chr(0x80) & cur_b.GetString("Prezzo")
PDFWriter1.addText(left, top, carSize,str_enc_1)

peccato che vedo solo ????????
tanti ??????
al posto di "€"
:rolleyes:

Grazie a tutti sopratutto per la pazienza
 
Last edited:

drgottjr

Expert
Licensed User
Longtime User
non tutti i caratteri sono disponibili. devi provare vari font con varie codifiche (UTF8, ISO-8859-1, UTF16, ecc) fino a trovare una corrispondenza (se esiste).

i ??? vogliono dire che questo carratere non e disponibile almeno in questo font e con questa codifica.

hai provato chr(0x20AC)?

c'est un alto pdfwriter disponibile qui: https://www.b4x.com/android/forum/threads/printing-and-pdf-creation.76712/#content

il e possibile che i font standard di pdfwriter non hanno questo carratere. pdfwriter data da 2011... e la versione originale e piu vecchia ancora.
 

DonManfred

Expert
Licensed User
Longtime User
I don´t speak Italian but i need to add that the PDF Printing library is probably doing it´s job fine if you use the right Typeface.
I´m pretty positive that the PDF Printing library is able to use costom typefaces and output the correct Symbols (€).

Another alternative to create PDFs is PDFBox.
 
Top