I didn't realize that statistical charts and graphs made by R were using fonts not installed on my Windows machine, these are:
Helvetica
Helvetica-Bold
Helvetica-Oblique
ZapfDingbats
I discovered that by running pdffonts <file.name.pdf>
from command line. So these fonts were not embedded in the PDF files.
I have my dissertation sent for printing but the printing house says these fonts need to be embedded in the PDF file. I have written it using LaTeX
and included graphs as PDFs.
How to replace or substitute these fonts (some are licensed) with very similar ones without distorting the graphs in the individual PDFs? I don't intend to use commercial utilities.
Notes
- Windows 7 32 bit
- This post was similar:
https://superuser.com/a/223687/212779
However, it was done with a commercial program and is relatively old by now. There might be better new ideas to overcome this problem. I hope so.
My trial so far
I have succeeded to do the replacement using the procedure in the following post by some expert in Ghostscript: https://superuser.com/q/39167/212779
This requires Ghostscript to be installed (I have version 9.15) plus Adobe PostScript for Windows, a universal one and this script from command line:
gswin32c ^
-dNOPAUSE ^
-dBATCH ^
-sDEVICE=pdfwrite ^
-dPDFSETTINGS=/prepress ^
-dCompatibilityLevel=1.4 ^
-dHaveTrueTypes=true ^
-dSubsetFonts=true ^
-sOutputFile="c:\path\to\somename.pdf" ^
-c ".setpdfwrite <</NeverEmbed [ ]>> setdistillerparams" ^
-f "c:\path\to\somename.ps"
Question
How to get the generated .ps
postscript file and subsequently the .pdf
file (which is now gracefully embedded with a similar font) having the same size of the original PDF, i.e., cropped exactly to the same dimensions of the original PDF file?
If I leave all default settings in Adobe Reader (version XI) -- not to be confused with the commercial Adobe Professional, I get the same size in .ps
file, so what I really need is some code in Ghostscript to preserved dimensions of the .ps
file when generate the final PDF, any help? BTW, I open the .ps
file with SumatraPDF
viewer.