public abstract class OfficeConvertOptions extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
OfficeConvertOptions.SubstituteFontRecord
Defines a font substitution record.
|
Constructor and Description |
---|
OfficeConvertOptions()
Constructor - sets defaults
|
Modifier and Type | Method and Description |
---|---|
boolean |
getEmbedFonts()
Get embed fonts flag
|
String |
getFallbackFontPath()
Get embed fallback font path
|
int |
getMaxUndefinedGlyphCountAllowed()
Get the maximum number of unsupported characters allowed when falling
back to the fallback font.
|
Map<String,OfficeConvertOptions.SubstituteFontRecord> |
getSubstituteFontsMap() |
void |
setEmbedFonts(boolean embedFonts)
Set embed fonts flag Default = true
|
void |
setFallbackFontPath(String fallbackFontPath)
Set path to TrueType fallback font that will be used when a local font
cannot be found to embed for a Word document font.
|
void |
setFontSubstitute(String origFontFamily,
String substituteFontFamily,
boolean preferSubstitute)
Creates a SubstituteFontRecord instance and maps it to the origFontFamily
see setSubstituteFontsMap(Map . |
void |
setMaxUndefinedGlyphCountAllowed(int max)
Set the maximum number of unsupported characters allowed when falling
back to the fallback font.
If no Fallback Font Path has been set then this value is not used. When getEmbedFonts() == true, for each font used in the Office Document we will attempt to match a font from the local system to embed in the PDF. |
void |
setSubstituteFontsMap(Map<String,OfficeConvertOptions.SubstituteFontRecord> fontNameSubstitutions)
Sets a map of font family names to substitute font family names.
|
public boolean getEmbedFonts()
public void setEmbedFonts(boolean embedFonts)
embedFonts
- - true to embed fontspublic String getFallbackFontPath()
public void setFallbackFontPath(String fallbackFontPath)
fallbackFontPath
- - path to fallback font .TTF filepublic void setMaxUndefinedGlyphCountAllowed(int max)
max
- - the maximum number of unsupported characters to allow in the
resulting PDF when getEmbedFonts() == true and the fallback
font has been set.public int getMaxUndefinedGlyphCountAllowed()
setMaxUndefinedGlyphCountAllowed(int)
.public void setSubstituteFontsMap(Map<String,OfficeConvertOptions.SubstituteFontRecord> fontNameSubstitutions)
fontNameSubstitutions
- - a Mappublic Map<String,OfficeConvertOptions.SubstituteFontRecord> getSubstituteFontsMap()
setSubstituteFontsMap(Map)
.public void setFontSubstitute(String origFontFamily, String substituteFontFamily, boolean preferSubstitute)
setSubstituteFontsMap(Map)
.origFontFamily
- - should be the font family name of a font to set a SubstituteFontRecord forsubstituteFontFamily
- - should be the name of the substitute font family to use for origFontFamilypreferSubstitute
- - whether the substitute should be used even if the origFontFamily is available