Printing PDF with not embedded TrueType Font (cups / lpr)
I'm getting crazy over here, I already googled my a** off but didn't find an answer.
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/.fonts folder
- Copied it in the /usr/share/fonts
- With root: SuSEconfig --module fonts
... are just some varous things I tried during googling.
Anyway when I try to print the pdf with the command:
lpr -PHL2400Ce -o -# 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 already see the OCRB font in the viewer 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?
Thanks for your time.
there's level 1 - level 3 pdfs, and the number of fonts you have goes up. Make sure you're set for level 3 all along. Check you have the font in /usr/share/ghostscript/fonts or some similar place. An if at first you don't succeed - give up. Embed the fonts always as this sort of thing is wearing.
The problem is "its not in my power" to embed the font ;)
I copies the ttf font in the /usr/share/ghostscript/fonts doesnt help though :S
you need to rerun mkfontalias, mkfontscale, & mkfontdir after adding a font, and a ttf will be ignored by ghostscript. Try this
http://onlinefontconverter.com/ and make it a pfm or something. That might help.
Thanks for pointing me in the right direction.
I did the following now:
I used http://www.freefontconverter.com/ to convert the ttf into a .pfb.
I copied the pfb into /usr/share/ghostscript/fonts/
I added the following line to the fontmap file (located at /usr/share/ghostscript/<gsversion>/lib/Fontmap):
Then I used the following command to embedd the font:
gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=output.pdf -f test.pdf
When I print via lpr the font is now correct... but I have a new problem, the "margins" on the paper are not the same.
When I print it via lpr everything is like 1 cm displaced (to the bottom), but when I print (the same pdf) with adobe (on windows) its correct.
Any advise on that?
|All times are GMT -5. The time now is 10:12 PM.|