I am trying to export a list of graphics as separate frames in PDF format in order to then compile a vector SWF animation with the aid of external utility (such as pdf2swf).
One workaround is to export to EMF instead of PDF format:
Export["C:\\1.emf",
Plot[Sin[x], {x, 0, Pi}, PlotLabel ->
"\:0420\:0443\:0441\:0441\:043a\:0438\:0435 \:0431\:0443\:043a\:0432\:044b"]]
You can further convert EMF to PDF or SWF if you wish. See here general tips on high-quality EMF export from Mathematica.
Another way that seemingly works reliably is to convert only Cyrillic text to outlines and then place it in your graphics with Inset
or with Labeled
:
plotLabel =
First@ImportString[ExportString[
"\:0420\:0443\:0441\:0441\:043a\:0438\:0435 \:0431\:0443\:043a\:0432\:044b",
"PDF"], "PDF"];
Labeled[Plot[Sin[x], {x, 0, Pi}], plotLabel, Top]
Or you can use the outlined text directly as PlotLabel
:
Export["C:\\1.pdf", Plot[Sin[x], {x, 0, Pi}, PlotLabel -> plotLabel]]
You can generalize this method by writing a simple routine:
cyrFix = First@ImportString[ExportString[#, "PDF"], "PDF"] &
You can use it as follows:
Export["C:\\1.pdf",
Plot[Sin[x], {x, 0, Pi}, PlotLabel ->
cyrFix@"\:0420\:0443\:0441\:0441\:043a\:0438\:0435 \:0431\:0443\:043a\:0432\:044b"]]
Mathematica's PDF export does not curremtly support Cyrillic, only Roman, Greek, Japanese, and some technical symbols. If you are using a Mac you can choose File > Print > Save As PDF as a workaround.