# How can I convert text to paths with pdflatex?

Is there any way to convert text to paths? I tried to use Inkscape, but it has some troubles with reading a PDF file.

The PDF is produced by pdflatex (I can't use dvips) with the beamer class and the beamerposter package.

Basically, I understand that Type1 fonts should be enough, however people in our print office require paths instead of text.

-
You can also use dvips with beamer! –  Herbert Jul 18 '11 at 18:39
no, beamerposter has some problems with dvips and don't produce correct file –  morph Jul 18 '11 at 18:44
well, I don't know why, hovewer all tips were too much complicated or don't work... In fact, different printer solved my problem... Anyway, my question should be deleted... –  morph Jul 20 '11 at 18:14

Works also with package beamerposter

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{pst-text}
\DeclareFixedFont{\RM}{T1}{ptm}{b}{n}{2cm}

\begin{document}

\begin{frame}{News}{}
\pscharpath{\RM Japan won}\par\pause
\pscharpath[fillstyle=solid,fillcolor=red!70]{\RM the World}\par\pause
\pscharpath[fillstyle=solid,fillcolor=blue!70]{\RM Cup}\par\pause
\end{frame}

\end{document}


An alternative with less possibilities for filling is to use an outline font like Biolinum:

\documentclass{beamer}
\usepackage{fontspec}
\setsansfont{Linux Biolinum O}
\newfontface\Outline{Linux Biolinum Outline O}
\begin{document}

\begin{frame}{News}{}
\fontsize{40}{42}\selectfont\Outline
Japan won\par\pause
the World\par\pause
Cup\par\pause
\end{frame}
\end{document}


This needs a lualatex or xelatex run!

-
so, I have to use \pscharpath before each textline and redeclare all fonts? –  morph Jul 18 '11 at 18:58
yes, but you can also use an outline font, see my edit. –  Herbert Jul 18 '11 at 19:15
could you, please, put somewhere on the web final pdf? I'm not sure if it is exactly what I need –  morph Jul 18 '11 at 19:27
Why don't you run the above examples?? –  Herbert Jul 18 '11 at 19:34
'cause something is wrong with beamerposter and I'd like to know, whether this is what I need before I start solving that troubles... –  morph Jul 18 '11 at 19:44

I assume you want to convert the entire document into outlines, in this case you can use pdf2ps utility to convert the PDF to outlined PS file, and you can then use ps2pdf to convert it back to PDF (both utilities from Ghostscript).

$pdffonts test.pdf name type emb sub uni object ID ------------------------------------ ----------------- --- --- --- --------- PEUCZM+Amiri-Regular CID TrueType yes yes yes 18 0$ pdf2ps test.pdf
$ps2pdf test.ps$ pdffonts test.pdf
name                                 type              emb sub uni object ID
---


-
colors are different, the letter "l" is bold???!!! and one figure looks like after some compression :( –  morph Jul 18 '11 at 20:39
This does not work with a recent (9.05) GhostScript. Comments here indicate that it was a misfeature if it once worked. –  Martin Schröder Oct 4 '12 at 21:27

Try

pdftops -level3 myfile.pdf myfile.ps


(note pdftops not pdf2ps) and then use ghostscript to convert back to pdf with a command something like:

gswin32c -q -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dNOPAUSE -dPDFSETTINGS=/prepress -dAutoRotatePages=/None -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile=myfile-curves.pdf -c "/show { true charpath currentpoint /jy exch def /jx exch def fill jx jy moveto} bind def /ashow {exch pop exch /j_ax exch def show /j_ax {0} def } bind def /widthshow { show pop pop pop} bind def /awidthshow {ashow pop pop pop} bind def" -f myfile.ps

-
This doesn't work any more, certainly not in gs9.14. –  yo' Apr 20 at 8:45
@yo' and exactly how does it fail? –  Lev Bishop Apr 21 at 15:32