java - Supporting special characters in printing -



java - Supporting special characters in printing -

a more accurate question here

i have dbf database file containing several names , info of employees... , java application reads rows database , prepare papers (like work certificate...). , utilize special characters in names since it's francophone country. illustration "hédia" or "fayçal".. problem here database contains names special characters mentioned, , when printing papers in question, characters not supported , empty white space shown instead. hope making myself clear.

so there way programmatically create printing back upwards these characters?

i know there's locale class in java don't know if possible utilize printing purposes.

i hope problem gets solved , give thanks in advance help.

edit: create table way i'm using normal table constructor , add together info i'm using class fetches info database , returns object [], , method class since it's more 1 row.

here printing code table (i wrapped table printable format header , footer):

final messageformat headerformat = new messageformat(builder.tostring(), locale.france); printrequestattributeset aset = new hashprintrequestattributeset(); aset.add(orientationrequested.landscape); aset.add(printquality.high); bulletin.print(printmode.fit_width, headerformat, null, true, aset, true); }catch (printerexception pe) { string s= "une erreur est survenue lors de l'impression, vérifier que votre imprimante est connectée \n si le problème persiste, contacter la personne qui s'occupe de votre système"; joptionpane.showmessagedialog(bulletin, s, "erreur d'impression", 1); } catch(indexoutofboundsexception e){ joptionpane.showmessagedialog(bulletin, "aucun bulletin dans la liste. veuillez au moins ajouter une entrée.\n pour ajouter une entrée, cliquez sur le menu \"gérer les assurances\" puis sur \"ajouter united nations bulletin\".", "aucun bulletin selectionné", 1); }

to build textpane it's default constructor plus method fetch info , add together info default text contained in jtextpane (the type of jtextpane html way).

and 1 printing textpane (it's default printing method of jtextpane):

public void print() { messageformat headermessage=new messageformat("header"); printrequestattributeset aset = new hashprintrequestattributeset(); aset.add(orientationrequested.portrait); aset.add(printquality.high); seek { attest.print(headermessage, null, true, null, aset, true); } grab (printerexception e) { e.printstacktrace(); } }

java printing special-characters

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -