问题
Is it possible, using Adobe Acrobat or another tool, to globally replace a font in a PDF?
How can I do this?
回答1:
Without seeing your particular file it is hard to say that this would definitely work. But, typically a font is defined like this:
/Resources <<
/Font << /F13 1 0 R >>
>>
1 0 obj <<
/Type /Font
/Subtype /Type1
/BaseFont /Helvetica
>> endobj
The font resource is then used as /F13 12 Tf
wherever text is drawn with it.
If you were to change the /BaseFont
in the definition, it would affect all uses of that font resource.
回答2:
Replacing a font in a PDF is generally not a good idea. You should not expect behavior similar to replacing a font in e.g. a MS Word document. In PDF, individual glyphs or runs of glyphs are positioned absolutely. At the time the PDF was generated, this positioning was based on the respective widths (and other metrics) of the glyphs in the used font. When you replace a font, the position of the glyphs will remain unchanged, but in general the widths of the glyphs will differ from those in the original font. This will cause distorted text formatting like this:
来源:https://stackoverflow.com/questions/17689487/how-to-globally-replace-font-in-a-pdf