public class Configuration extends Object
Various configuration options for PDFxStream may be set using this class. A custom configuration may be registered with PDFxStream in any of three ways:
default Configuration
or by creating a new Configuration
,
modifying it as desired, and setting it
as the new default instance.Configuration
instance to one of the {code PDF.open}
factory methods:
Document
via
Document.setConfig(Configuration)
function. Note that certain configuration properties
are utilized only during Document
initialization, so default settings will end up being
used during that initialization phase.Constructor and Description |
---|
Configuration()
Creates a
Configuration whose properties are derived from the original defaults and the current
value of system properties. |
Configuration(Configuration other)
Creates a copy of the given
Configuration instance. |
Modifier and Type | Method and Description |
---|---|
static Configuration |
getDefault()
Returns the configuration that new
Document instances use by default. |
String |
getLinebreakString()
Returns the string that
OutputTarget (and its subclasses) output for each linebreak identified in
extracted PDF content. |
int |
getMinTableCellCount()
Returns the minimum number of adjacent cells that must be present in order
for PDFxStream to recognize those cells collectively as a
Table . |
static boolean |
isCJKSupportEnabled()
Returns true if this configuration will cause PDFxStream to extract and decode Chinese, Japanese,
and Korean content.
|
boolean |
isDeriveType3Fonts()
Returns true if this configuration will cause PDFxStream to derive the Unicode encodings of Type3
PDF fonts.
|
boolean |
isImplicitLineDetectionEnabled() |
boolean |
isStripXFAFormDataEnabled() |
boolean |
isTableDetectionEnabled()
Returns true only if
Table detection is enabled; defaults to true. |
static void |
setCJKSupportEnabled(boolean enableCJK)
Changes the setting that controls whether or not PDFxStream extracts and decodes Chinese, Japanese,
and Korean content.
|
static void |
setDefault(Configuration defaultConfig)
Sets the configuration that new
Document instances use by default. |
void |
setDeriveType3Fonts(boolean deriveType3Fonts)
Changes the setting that controls whether or not PDFxStream derives the Unicode encodings of Type3
PDF fonts.
|
void |
setImplicitLineDetectionEnabled(boolean detectImplicitLines) |
void |
setLinebreakString(String linebreak)
Sets the string that
OutputTarget (and its subclasses) output for each linebreak identified in
extracted PDF content. |
void |
setMinTableCellCount(int minTableCellCount)
Changes the setting that controls the minimum number of adjacent cells that must be present in order
for PDFxStream to recognize those cells collectively as a
Table . |
void |
setStripXFAFormDataEnabled(boolean stripXFAFormData) |
void |
setTableDetectionEnabled(boolean detectTables)
Sets whether or not
Table detection is enabled. |
String |
toString() |
public Configuration(Configuration other)
Configuration
instance.public Configuration()
Configuration
whose properties are derived from the original defaults and the current
value of system properties.
This does not take the current default configuration
into account.public static Configuration getDefault()
Document
instances use by default.Configuration.setDefault(Configuration)
public static void setDefault(Configuration defaultConfig)
Document
instances use by default.public boolean isTableDetectionEnabled()
Table
detection is enabled; defaults to true.public void setTableDetectionEnabled(boolean detectTables)
Table
detection is enabled.public boolean isStripXFAFormDataEnabled()
public void setStripXFAFormDataEnabled(boolean stripXFAFormData)
public int getMinTableCellCount()
Table
. This setting defaults
to 4.public void setMinTableCellCount(int minTableCellCount)
Table
. This setting defaults
to 4.public boolean isImplicitLineDetectionEnabled()
public void setImplicitLineDetectionEnabled(boolean detectImplicitLines)
public static boolean isCJKSupportEnabled()
public static void setCJKSupportEnabled(boolean enableCJK)
public boolean isDeriveType3Fonts()
public void setDeriveType3Fonts(boolean deriveType3Fonts)
public String getLinebreakString()
OutputTarget
(and its subclasses) output for each linebreak identified in
extracted PDF content. This value defaults to the current platform's line break string, as identified
by the line.separator
system property.public void setLinebreakString(String linebreak)
OutputTarget
(and its subclasses) output for each linebreak identified in
extracted PDF content. This value defaults to the current platform's line break string, as identified
by the line.separator
system property.