ReplaceFonts
Fonts, Document manipulation
Description
Replaces embedded fonts with equivalent "Standard" fonts, reducing the file size. Fonts are replaced with the one of the 14 "Standard" fonts listed below:
Courier Courier-Bold
Courier-BoldOblique Courier-Oblique Helvetica
Helvetica-Bold Helvetica-BoldOblique Helvetica-Oblique Times-Roman
Times-Bold Times-Italic Times-BoldItalic Symbol ZapfDingbats
For example, ArialMT font will be replaced with Helvetica "Standard". Note that the "Standard" fonts do not contain the full Unicode character set but only the 229 characters defined by the WinAnsiEncoding table.
Syntax
Delphi
function TPDFlib.ReplaceFonts(Options: Integer): Integer;ActiveX
Function PDFlib::ReplaceFonts(Options As Long) As LongDLL
int DLReplaceFonts(int InstanceID, int Options);Parameters
| Options | 0 = Default. Standard and much preferrered level of font replacement 1 = Special option to replace fonts and also remove the subsetted fonts and also the WinAnsiEncoding entry. This will only work if there is no other Encoding entry and is for very specific documents only. 10 = Do not replace the FontDescriptor but delete the FontFile2 embedded font data. This will turn an embedded font into a non embedded font for fonts that match closely to a Standard font such as ArialMT. Most viewers will use Arial to render ArialMT anyway if it is not embedded. |
|---|
Return values
| 0 | Nothing was changed |
|---|---|
| 1 | A replacement of some type was made. |