[R] pdf font encoding

M.Kondrin mkondrin at hppi.troitsk.ru
Fri Aug 20 22:37:58 CEST 2004

Petr Pikal wrote:

>Dear all.
>This is probably more PDF then R issue but anyway, maybe 
>somebody can help me.
>I try to persuade pdf device to use eastern european (Czech) 
>encoding but I was not successful yet. Working on W 2000, R 
>1.9.0, lattice plots.
>pdf("redprov.pdf", width = 5, height = 5, bg="white", 
>family="Times", encoding="WinAnsi")
>The characters are OK when using other devices (screen, png, ...) 
>but in case of pdf, some characters are not correctly shown nor 
>After reading help pages and some archives I understand I shall 
>change encoding and/or font but after I used several combinations 
>without making any progress I gave up. Shall I install some other 
>encoding and/or fonts?
>Any help is greatly appreciated.
>Best regards
>Petr Pikal
>petr.pikal at precheza.cz
>R-help at stat.math.ethz.ch mailing list
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
If you are working under Linux I would suggest using 
bitmap(type="pdfwrite") instead of pdf(). Bitmap function is a shortcut 
for postscript() and ps2pdf command from ghostscript (so as far as you 
manage to install national fonts into ghostscript it will be OK with non 
ascii symbols). As I have heard Windows has some problems with 
postscript, so do not know how it will work under Windows.

More information about the R-help mailing list