Class AnalysisResult
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.pdfa.validation.AnalysisResult
-
public class AnalysisResult extends NativeObject
The PDF/A analysis result
Result of the validator's method
Validator.analyze(com.pdftools.pdf.Document)
which is required for the conversion to PDF/A withpdftools.pdfa.conversion.Converter.convert
.Note that
AnalysisResult
objects remain valid as long as theirpdftools.pdf.Document
has not been closed and the analysis result has not been used inpdftools.pdfa.conversion.Converter.convert
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods 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)-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getConformance
public Conformance getConformance()
The conformance used for analysis (Getter)
The PDF/A level might differ from the
AnalysisOptions.getConformance()
. If the claimed PDF/A level of the input document is higher thanAnalysisOptions.getConformance()
, the higher level is used forgetConformance()
.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.
-
getRecommendedConformance
public Conformance getRecommendedConformance()
The recommended conversion conformance (Getter)
The optimal PDF/A conformance for the conversion (i.e. thepdftools.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.
-
getIsConversionRecommended
public boolean getIsConversionRecommended()
Whether the document should be converted to PDF/A (Getter)
A conversion is generally recommended in the following cases:
-
If
getIsConforming()
isfalse
, i.e. if the document does not conform to thegetConformance()
. - If the document is conforming, but other issues are found for which a conversion is highly recommended. For example, if certain corner cases of the specification are detected.
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. -
If
-
getIsConforming
public boolean getIsConforming()
Whether the document is conforming (Getter)
Whether the document conforms to thegetConformance()
. Note that even if this property returnstrue
a conversion might still be recommended as indicated bygetIsConversionRecommended()
.
-
getIsSigned
public boolean getIsSigned()
Whether the document is digitally signed (Getter)
-
getHasEmbeddedFiles
public boolean getHasEmbeddedFiles()
Whether the document contains embedded files (Getter)
-
getFontCount
public int getFontCount()
The number of fonts used in the document (Getter)
-
-