I have a PDF in which the TrueType font OCRB is used, however the font is not embedded.
So I tried to install the font on my system (which is by the way a SLES11 SP2), I did the following things:
- Double Clicked the font on gnome Desktop and clicked install
- Copied it in the
/user/home/username/.fontsfolder - Copied it in the
/usr/share/fonts - With root:
SuSEconfig --module fonts fc-cache
When I try to print the .pdf with the command:
lpr -PHL2400Ce -# 1 test.pdf
The .pdf prints just fine, but the OCRB font is gone and replaced with the standard one.
However, when I open the .pdf with evince (gnome Document viewer) I see the OCRB font in the viewer (correct) and when I print it (with the same printer) its there and absolutely correct.
I don't understand this because I guess evince also uses lpr in some way? Any ideas what I can do? (It is very important for me being able to print the .pdf via command line, since it's gonna be part of batch jobs which runs in background)
I also tried some approaches like this:
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=output2.pdf -f test.pdf
Which brings me the output:
....
Can't find (or can't open) font file Arial-BoldMT.
Didn't find this font on the system!
Substituting font Helvetica-Bold for Arial-BoldMT.
Substituting font Helvetica for OCRB
So what I see here is, that gs substitutes Helvetica for OCRB even though there is no message Can't find or can't open font... as it is for Arial-Bold. Any idea why?
lpr, add the linegtk-print-backends="pdf,cups,lpr"to your~/.gtkrc-2.0. By default, it's using CUPS directly. Not sure what yourlpris (CUPS' compat clients?), and how it works (i.e. how could you do what evince does from the command line), sorry. – sr_ Nov 21 '12 at 7:49lprunder the hood unless you make it do this, so, yes, testing purposes :) – sr_ Nov 21 '12 at 8:23lpr -PHL2400Ceit also printed correctly (with the OCRB) – tenhouse Nov 21 '12 at 8:39