public class PDFStructureReaderSettings extends Object implements ReaderSettings
ReaderSettings
to configure load behavior of the PDF structure.
The behavior is configured via a PDFStructureReaderSettings.PDFStructureReadStrategy
. The default is to use a strict
parser and throw exceptions on structural errors.
The Mode PDFStructureReaderSettings.PDFStructureReadStrategy.LENIENT_ON_ERROR
will first try to read the cross
reference table via the default mechanism. If errors occur, it will use a generated cross
reference table as fallback.
In this mode, some errors like duplicate object definition are not handled correctly due to the
fact that the cross reference table could be read, but contained wrong values. A validation of
all objects is not possible / desired at that time.
The Mode PDFStructureReaderSettings.PDFStructureReadStrategy.ALWAYS_GENERATE_XREF
will always generate the cross
reference table without using the existing "startxref" or "xref" locations. This mode also
handles duplicate objects and some other structural errors.
Important
Although using a non-STRICT Read strategy may help in displaying the document, it is not
guaranteed that the display of the document is correct. The non-STRICT modes work on a
best-effort base.
Information might get lost or there might be display errors which are not related to the PDF
structure itself.
Non-STRICT read modes should therefore be carefully chosen - the integrating application is
responsible for the document quality.
LenientPDFDocumentStructureParser
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
PDFStructureReaderSettings.PDFStructureReadStrategy
Defines the strategy to be used when reading the PDF structure.
|
Constructor and Description |
---|
PDFStructureReaderSettings() |
Modifier and Type | Method and Description |
---|---|
PDFStructureReaderSettings |
createSnapshot()
Create a snapshot copy of this instance.
|
boolean |
equals(Object o) |
PDFStructureReaderSettings.PDFStructureReadStrategy |
getPDFStructureReadStrategy() |
int |
hashCode() |
void |
setPDFStructureReadStrategy(PDFStructureReaderSettings.PDFStructureReadStrategy readStrategy) |
public PDFStructureReaderSettings createSnapshot()
SerializableProcessingSettings
createSnapshot
in interface ProcessingSettings
createSnapshot
in interface SerializableProcessingSettings
public PDFStructureReaderSettings.PDFStructureReadStrategy getPDFStructureReadStrategy()
public void setPDFStructureReadStrategy(PDFStructureReaderSettings.PDFStructureReadStrategy readStrategy)
Copyright © 2024 levigo holding gmbh. All rights reserved.