Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
About
People
Publications
Teaching
Resources
Research Blog
Wiki Functions
Recent changes
Help
Licensing
Project page
Discussion
Edit
View history
Editing
CommunityData:Embedding fonts in PDFs
From CommunityData
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
To check to see if a PDF is missing fonts, you can use the program <code>pdffonts</code> which comes in the Debian/Ubuntu package <code>poppler-utils</code> and the Arch Linux package <code>poppler</code>. If you run: pdffonts foo.pdf It should tell if you if the font is missing any fonts in that they will have rows with "no" in the column labled "emb". This bash script will run a magical incantation of ghostscript which will embed fonts: #!/bin/bash for file in "$@" do tmp_file=$(tempfile) output_file=$(echo $file |perl -p -e 's/.pdf$/-embedded_fonts.pdf/') # add fonts to each pdf gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer \ -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true \ -dUseCIEColor=true \ -dEmbedAllFonts=true \ -sOutputFile="$tmp_file" -f "$file" > /dev/null mv "$tmp_file" "$output_file" done If you install this on your system (e.g., in <code>bin/embed-fonts</code> you can then just run it on a file like: ./embed-fonts foo.pdf This will then create a new file called <code>foo-embedded_fonts.pdf</code> in the same directory as the original. You can verify that the fonts are embedded with <code>pdffonts</code>.
Summary:
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see
CommunityData:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:
Cancel
Editing help
(opens in new window)
Tools
What links here
Related changes
Special pages
Page information