Class 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 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.

  • Method Details

    • 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 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.

    • getRecommendedConformance

      public Conformance getRecommendedConformance()

      The recommended conversion conformance (Getter)

      The optimal PDF/A conformance for the conversion (i.e. the 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.
    • 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() is false, i.e. if the document does not conform to the getConformance().
      • 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.

    • getIsConforming

      public boolean getIsConforming()

      Whether the document is conforming (Getter)

      Whether the document conforms to the getConformance(). Note that even if this property returns true a conversion might still be recommended as indicated by getIsConversionRecommended().
    • 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)