public class FontOptions extends NativeObject
Modifier and Type | Method | Description |
---|---|---|
boolean |
getMerge() |
Whether to merge fonts and font programs (Getter)
|
boolean |
getRemoveStandardFonts() |
Whether to remove standard fonts (Getter)
|
void |
setMerge(boolean value) |
Whether to merge fonts and font programs (Setter)
|
void |
setRemoveStandardFonts(boolean value) |
Whether to remove standard fonts (Setter)
|
equals, hashCode
public boolean getMerge()
A PDF document can have the same font, or a subset of it, embedded multiple times. This commonly occurs, when multiple PDFs are merged into one large PDF. Such fonts can be merged into one font.
Merging fonts and font programs can greatly reduce the file size. However, it is computationally complex and can increase file processing time and memory usage substantially.
Default: true
.
public void setMerge(boolean value)
A PDF document can have the same font, or a subset of it, embedded multiple times. This commonly occurs, when multiple PDFs are merged into one large PDF. Such fonts can be merged into one font.
Merging fonts and font programs can greatly reduce the file size. However, it is computationally complex and can increase file processing time and memory usage substantially.
Default: true
.
public boolean getRemoveStandardFonts()
Enable or disable un-embedding of the font programs of all embedded standard fonts, such as Arial, Courier, CourierNew, Helvetica, Symbol, Times, TimesNewRoman and ZapfDingbats. This decreases the file size.
The fonts are replaced with one of the 14 PDF Standard Fonts, all of which have no associated font program. A PDF viewer must be able to display these 14 PDF Standard Fonts correctly. Therefore, enabling this property usually does not visually alter the PDF when it is displayed.
Un-embedding the font works based on the font's Unicode information, i.e. the un-embedded font's characters are mapped to those of the original font with the same Unicode. Therefore, only fonts with Unicode information are un-embedded.
If a font's Unicode information is incorrect, un-embedding may lead to visual differences. The correctness of a Unicode information can be verified by extracting text that uses the font.
If the extracted text is meaningful, the font's Unicode information is correct, and un-embedding of the font does not cause visual differences.
Default: false
(disabled) except in the profile profiles.MinimalFileSize
.
public void setRemoveStandardFonts(boolean value)
Enable or disable un-embedding of the font programs of all embedded standard fonts, such as Arial, Courier, CourierNew, Helvetica, Symbol, Times, TimesNewRoman and ZapfDingbats. This decreases the file size.
The fonts are replaced with one of the 14 PDF Standard Fonts, all of which have no associated font program. A PDF viewer must be able to display these 14 PDF Standard Fonts correctly. Therefore, enabling this property usually does not visually alter the PDF when it is displayed.
Un-embedding the font works based on the font's Unicode information, i.e. the un-embedded font's characters are mapped to those of the original font with the same Unicode. Therefore, only fonts with Unicode information are un-embedded.
If a font's Unicode information is incorrect, un-embedding may lead to visual differences. The correctness of a Unicode information can be verified by extracting text that uses the font.
If the extracted text is meaningful, the font's Unicode information is correct, and un-embedding of the font does not cause visual differences.
Default: false
(disabled) except in the profile profiles.MinimalFileSize
.