In my document the pdfrender
package is used to give some text with a special font a bold outline. Then the resulting file is converted into a PNG (for the website) as well as a PDF with all characters turned into paths (requested by the printing company).
For both conversions I use Ghostscript. The PNG is done with standalone
convert feature which calls Ghostscript (or Image Magick which uses Ghostscript internally) and for the font-less PDF I'm using the NoOutputFonts feature.
So far so good, however with pdfrender
Ghostscript generates all outlines including the ones which are overlapped by other text parts which should not be visible and aren't in the normal PDF. Is there any Ghostscript setting to avoid this? Alternate solutions which switch from pdfrender
to another method or an alternative to Ghostscript are also welcome.
My minimized example code is:
\documentclass[border=1pt,png={ghostscript,gsexe=gswin64c}]{standalone}\usepackage{xcolor}\usepackage{LobsterTwo}\usepackage[T1]{fontenc}\usepackage{pdfrender}\begin{document}\Huge\LobsterTwo\slshape\textpdfrender{% TextRenderingMode=2, LineWidth=.01ex, StrokeColor=black, FillColor=yellow,}{nig}%\end{document}
The normal PDF looks like this:
The PNG looks like:
And the vectorized PDF (gswin64c -dNoOutputFonts -sDEVICE=pdfwrite -o gstest_vec.pdf gstest.pdf
) looks the same: