public class AnalysisResult extends NativeObject
Result of the validator's method Validator.analyze(com.pdftools.pdf.Document)
which is required for the conversion to PDF/A with pdftools.pdfa.conversion.Converter.convert
.
Note that AnalysisResult
objects remain valid as long as their pdftools.pdf.Document
has not been closed and the analysis result has not been used in pdftools.pdfa.conversion.Converter.convert
.
Modifier and Type | Method | Description |
---|---|---|
Conformance |
getConformance() |
The conformance used for analysis (Getter)
|
int |
getFontCount() |
The number of fonts used in the document (Getter)
|
boolean |
getHasEmbeddedFiles() |
Whether the document contains embedded files (Getter)
|
boolean |
getIsConforming() |
Whether the document is conforming (Getter)
|
boolean |
getIsConversionRecommended() |
Whether the document should be converted to PDF/A (Getter)
|
boolean |
getIsSigned() |
Whether the document is digitally signed (Getter)
|
Conformance |
getRecommendedConformance() |
The recommended conversion conformance (Getter)
|
equals, hashCode
public Conformance getConformance()
The PDF/A level might differ from the AnalysisOptions.getConformance()
.
If the claimed PDF/A level of the input document is higher than AnalysisOptions.getConformance()
, the higher level is used for getConformance()
.
For example, if AnalysisOptions.getConformance()
is PDF/A-2b, but the document's claimed conformance is PDF/A-2u, the analysis checks if the document actually conforms to its claimed conformance PDF/A-2u.
Because otherwise a conversion is required.
public Conformance getRecommendedConformance()
pdftools.pdfa.conversion.ConversionOptions.getConformance
).
The recommended conformance level might be higher than the analysis conformance, if the document actually contains all data required for the higher level.
It might also be lower, if the document is missing some required data.public boolean getIsConversionRecommended()
A conversion is generally recommended in the following cases:
getIsConforming()
is false
, i.e. if the document does not conform to the getConformance()
.
Note that in certain processes it might also be beneficial to convert a document if its conformance does not match the getRecommendedConformance()
.
This will actually upgrade the PDF/A level of the input document.
public boolean getIsConforming()
getConformance()
.
Note that even if this property returns true
a conversion might still be recommended as indicated by getIsConversionRecommended()
.public boolean getIsSigned()
public boolean getHasEmbeddedFiles()
public int getFontCount()