com.pdfunit.validators

## Class DocumentValidator

- java.lang.Object
- - com.pdfunit.validators.AbstractValidator
  - - com.pdfunit.validators.AbstractPageValidator
    - - com.pdfunit.validators.DocumentValidator

-     @DoNotObfuscate
      public final class DocumentValidator
      extends com.pdfunit.validators.AbstractPageValidator

  The main entry class to all validators.

  This validator provides all 'first' methods of the fluent API. The methods mostly return instances of other validators

  Since:
    2016.05
  Author:
    Carsten Siedentop, January 2016

- - ### Field Summary

    - ### Fields inherited from class com.pdfunit.validators.AbstractPageValidator

      `effectedPageNumbers, pageScanFlag, pagesToUse, region`

    - ### Fields inherited from class com.pdfunit.validators.AbstractValidator

      `testDocument`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocumentValidator(com.pdfunit.internal.spi.IDocument testDocument)` This constructor is the entry to all tests.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompareDocumentValidator` | `and(byte[] byteArrayMaster)` This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(byte[] byteArrayMaster, java.lang.String password)` This method creates an instance of a validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.io.File fileMaster)` This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.io.InputStream fisMaster)` This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.io.InputStream fisMaster, java.lang.String password)` This method creates an instance of a validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.lang.String filenameMaster)` This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.lang.String compareFilename, java.lang.String password)` This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.net.URL urlMaster)` This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `CompareDocumentValidator` | `and(java.net.URL urlMaster, java.lang.String password)` This method creates an instance of a validator, which provides many methods, to compare a test-PDF with a master-PDF.
    `RenderedPageValidator` | `asRenderedPage(PagesToUse pagesToUse)` Deprecated.
    `CompliesWithValidator` | `compliesWith()`
    `DocumentValidator` | `containsImage(java.io.File imageFile, PagesToUse pagesToUse)` Deprecated.
    `DocumentValidator` | `containsImage(java.io.InputStream imageStream, PagesToUse pagesToUse)` Deprecated.
    `DocumentValidator` | `containsImage(java.lang.String imageFileName, PagesToUse pagesToUse)` Deprecated.
    `DocumentValidator` | `containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages)` This method verifies that one of the given images is present on the previously defined pages.
    `DocumentValidator` | `containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages, PagesToUse pagesToUse)` Deprecated.
    `PropertyValidator` | `hasAuthor()` This method does what the name suggests.
    `BookmarkDetailsValidator` | `hasBookmark()` This method verifies that a PDF document has one or more bookmarks.
    `AllBookmarksValidator` | `hasBookmarks()` This method verifies that a PDF document has one ore more bookmarks.
    `DateValidator` | `hasCreationDate()` This method returns a validator which provides validation methods for dates.
    `PropertyValidator` | `hasCreator()` This method returns a validator which provides validation methods for the document creator.
    `EmbeddedFileValidator` | `hasEmbeddedFile()` This method returns a validator which provides validation methods for embedded files.
    `DocumentValidator` | `hasEncryptionLength(int expectedEncryptionLength)` This method does what the name suggests.
    `SingleFieldValidator` | `hasField(java.lang.String fieldname)` This method does what the name suggests.
    `AllFieldsValidator` | `hasFields()` This method does what the name suggests.
    `void` | `hasFields(java.lang.String... fieldNames)`
    `FontNameValidator` | `hasFont()` This method prepares the validation for one font.
    `AllFontsValidator` | `hasFonts()` This method verifies that the current PDF document has fonts.
    `DocumentValidator` | `hasFormat(DocumentFormat expectedFormat)` This method verifies the format against every page of a document.
    `DocumentValidator` | `hasFormat(DocumentFormat expectedFormat, PagesToUse pagesToUse)` Deprecated.
    `ImageValidator` | `hasImage()` This method checks that images exist on every effected pages.
    `ImageValidator` | `hasImage(PagesToUse pagesToUse)` Deprecated.
    `ImageValidator` | `hasImage(PagesToUse pagesToUse, PageRegion region)` Deprecated.
    `JavaScriptValidator` | `hasJavaScript()` This method verifies that the current PDF document has document level JavaScript.
    `JavaScriptActionValidator` | `hasJavaScriptAction()`
    `PropertyValidator` | `hasKeywords()` This method verifies the existence of keywords.
    `DocumentValidator` | `hasLanguageInfo(java.util.Locale expectedLocale)` This method does what the name suggests.
    `DocumentValidator` | `hasLanguageInfo(java.lang.String expectedLocale)` This method checks the expected language and country information against the data of the PDF document.
    `LayerNameValidator` | `hasLayer()` This method verifies whether a PDF document uses layers.
    `AllLayersValidator` | `hasLayers()` This method does what the name suggests.
    `DocumentValidator` | `hasLessPagesThan(int maximumNumberExclusive)` This method does what the name suggests.
    `GotoLocalActionValidator` | `hasLocalGotoAction()` This method does what the name suggests.
    `DateValidator` | `hasModificationDate()` This method does what the name suggests.
    `DocumentValidator` | `hasMorePagesThan(int minimumNumberExclusive)` This method does what the name suggests.
    `NamedDestinationValidator` | `hasNamedDestination()` This method does what the name suggests.
    `DocumentValidator` | `hasNoAuthor()` This method does what the name suggests.
    `DocumentValidator` | `hasNoCreationDate()` This method does what the name suggests.
    `DocumentValidator` | `hasNoCreator()` This method does what the name suggests.
    `DocumentValidator` | `hasNoImage()`
    `DocumentValidator` | `hasNoKeywords()` This method does what the name suggests.
    `DocumentValidator` | `hasNoLanguageInfo()` This method does what the name suggests.
    `DocumentValidator` | `hasNoModificationDate()` This method does what the name suggests.
    `DocumentValidator` | `hasNoProducer()` This method does what the name suggests.
    `DocumentValidator` | `hasNoProperty(java.lang.String key)` This method verifies that the current PDF document does not have the property with the key equals to the given parameter.
    `DocumentValidator` | `hasNoSubject()` This method does what the name suggests.
    `void` | `hasNoText()`
    `void` | `hasNoText(PagesToUse pagesToUse)` Deprecated.
    `void` | `hasNoText(PagesToUse pagesToUse, PageRegion region)` Deprecated.
    `DocumentValidator` | `hasNoTitle()` This method does what the name suggests.
    `DocumentValidator` | `hasNoXFAData()`
    `DocumentValidator` | `hasNoXMPData()`
    `DocumentValidator` | `hasNumberOfActions(int expectedNumber)`
    `DocumentValidator` | `hasNumberOfBookmarks(int expectedNumber)` This method does what the name suggests.
    `DocumentValidator` | `hasNumberOfDifferentImages(int expectedNumber)` This method compares the number of different images of a PDF document with the number, given by the parameter.
    `DocumentValidator` | `hasNumberOfDifferentImages(int expectedNumber, PagesToUse pagesToUse)` Deprecated.
    `DocumentValidator` | `hasNumberOfDifferentImages(int expectedNumber, PagesToUse pagesToUse, PageRegion region)` Deprecated.
    `DocumentValidator` | `hasNumberOfEmbeddedFiles(int expectedNumber)` This method does what the name suggests.
    `DocumentValidator` | `hasNumberOfFields(int expectedNumber)` This method does what the name suggests.
    `DocumentValidator` | `hasNumberOfFonts(int expectedNumber, IdentifiedBy filter)` This method does what the name suggests.
    `DocumentValidator` | `hasNumberOfLayers(int expectedNumber)` This method returns the number of layers (optional content groups).
    `DocumentValidator` | `hasNumberOfOCGs(int expectedNumber)` The function is identical with hasNumberOfLayers().
    `DocumentValidator` | `hasNumberOfPages(int expectedNumber)` This method does what the name suggests.
    `DocumentValidator` | `hasNumberOfSignatures(int expectedNumber)` This method verifies the given number of expected signatures.
    `DocumentValidator` | `hasNumberOfVisibleImages(int expectedNumber)` This method checks the number of visible images of a PDF document with the expected sum, given by the parameter.
    `DocumentValidator` | `hasNumberOfVisibleImages(int expectedNumber, PagesToUse pagesToUse)` Deprecated.
    `DocumentValidator` | `hasNumberOfVisibleImages(int expectedNumber, PagesToUse pagesToUse, PageRegion region)` Deprecated.
    `LayerNameValidator` | `hasOCG()` This method verifies whether a PDF document uses layers.
    `AllLayersValidator` | `hasOCGs()` This method verifies whether a PDF document uses layers.
    `DocumentValidator` | `hasOwnerPassword(java.lang.String expectedPassword)` This method checks that the current document can be opened with the password given by the parameter.
    `PermissionValidator` | `hasPermission()` This method prepares the validation of permissions of the current PDF documents.
    `PropertyValidator` | `hasProducer()` This method does what the name suggests.
    `PropertyValidator` | `hasProperty(java.lang.String key)` This method verifies that the current PDF document has a property with the key equals to the given parameter.
    `SignatureFieldValidator` | `hasSignatureField(java.lang.String fieldName)` This method checks that a signature field with the given name exists.
    `AllSignaturesValidator` | `hasSignatureFields()` This method verifies that a document has at least one signature field and prepares all signature fields for further checks.
    `PropertyValidator` | `hasSubject()` This method does what the name suggests.
    `TextValidator` | `hasText()` This method prepares the validation of text for the previously defined pages and regions.
    `TextValidator` | `hasText(PagesToUse pagesToUse)` Deprecated.
    `TextValidator` | `hasText(PagesToUse pagesToUse, PageRegion region)` Deprecated.
    `PropertyValidator` | `hasTitle()` This method does what the name suggests.
    `DocumentValidator` | `hasUserPassword(java.lang.String expectedPassword)` This method checks that the current document can be opened with the password given by the parameter.
    `VersionValidator` | `hasVersion()` This method does what the name suggests.
    `XFAValidator` | `hasXFAData()`
    `XMPValidator` | `hasXMPData()`
    `ZugferdValidator` | `hasZugferdData()`
    `DocumentValidator` | `isCertified()` Verifying that a PDF is certified.
    `DocumentValidator` | `isCertifiedFor(CertificationLevel expectedCertificationLevel)` Verifying that the certification level of the current PDF document is equal to the expected certification level.
    `DocumentValidator` | `isLinearizedForFastWebView()`
    `DocumentValidator` | `isSigned()` This method does what the name suggests.
    `DocumentValidator` | `isSignedBy(java.lang.String expectedSignatory)`
    `TaggingValidator` | `isTagged()`
    `PageValidator` | `restrictedTo(PagesToUse pagesToUse)` This method sets a page filter for the following validation process.

    - ### Methods inherited from class com.pdfunit.validators.AbstractPageValidator

      `createFullSizeRegionFromDocument, getEffectedPages, getPageScanFlag, setPagesToUse, setRegion`

    - ### Methods inherited from class com.pdfunit.validators.AbstractValidator

      `closeDocument, equals, getDocument, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DocumentValidator

          public DocumentValidator(com.pdfunit.internal.spi.IDocument testDocument)

      This constructor is the entry to all tests.

  - ### Method Detail

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.lang.String filenameMaster)

      This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.io.File fileMaster)

      This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.io.InputStream fisMaster)

      This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.net.URL urlMaster)

      This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.

    - #### and

          @Guarded
          public CompareDocumentValidator and(byte[] byteArrayMaster)

      This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF.

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.lang.String compareFilename,
                                             java.lang.String password)

      This method creates an instance of an validator, which provides many methods, to compare a test-PDF with a master-PDF. The master-PDF is opened with the given password.

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.io.InputStream fisMaster,
                                             java.lang.String password)

      This method creates an instance of a validator, which provides many methods, to compare a test-PDF with a master-PDF. The master-PDF is opened with the given password.

    - #### and

          @Guarded
          public CompareDocumentValidator and(java.net.URL urlMaster,
                                             java.lang.String password)

      This method creates an instance of a validator, which provides many methods, to compare a test-PDF with a master-PDF. The master-PDF is opened with the given password.

    - #### and

          @Guarded
          public CompareDocumentValidator and(byte[] byteArrayMaster,
                                             java.lang.String password)

      This method creates an instance of a validator, which provides many methods, to compare a test-PDF with a master-PDF. The master-PDF is opened with the given password.

    - #### asRenderedPage

          @Deprecated
          @Guarded
          public RenderedPageValidator asRenderedPage(PagesToUse pagesToUse)

      Deprecated.
      This method prepares the validation of PDF pages as rendered images.

      Instead of `AssertThat.document(filename).asRenderedPage(pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).asRenderedPage()`.

    - #### compliesWith

          public CompliesWithValidator compliesWith()

    - #### containsImage

          @Deprecated
          @Guarded
          public DocumentValidator containsImage(java.io.File imageFile,
                                                           PagesToUse pagesToUse)

      Deprecated.
      This method verifies that the given image is present on every page, defined by the second parameter.

      Instead of `AssertThat.document(filename).containsImage(imageFile, pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasImage().matching(imageFile)`.

    - #### containsImage

          @Deprecated
          @Guarded
          public DocumentValidator containsImage(java.lang.String imageFileName,
                                                           PagesToUse pagesToUse)

      Deprecated.
      This method verifies that the given image is present on every page, defined by the second parameter.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).containsImage(imageFile, pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasImage().matching(imageFile)`.

    - #### containsImage

          @Deprecated
          @Guarded
          public DocumentValidator containsImage(java.io.InputStream imageStream,
                                                           PagesToUse pagesToUse)

      Deprecated.
      This method verifies that the given image is present on every page in effect.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).containsImage(imageFile, pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasImage().matching(imageFile)`.

    - #### containsOneImageOf

          @Guarded
          public DocumentValidator containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages)

      This method verifies that one of the given images is present on the previously defined pages.

    - #### containsOneImageOf

          @Deprecated
          @Guarded
          public DocumentValidator containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages,
                                                                PagesToUse pagesToUse)

      Deprecated.
      This method verifies that one of the given images is present on the pages that are defined by the second parameter.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).containsOneImageOf(..)` use `AssertThat.document(filename).restrictedTo(pagesToUse).containsOneImageOf(..)`.

    - #### hasAuthor

          public PropertyValidator hasAuthor()

      This method does what the name suggests.

    - #### hasBookmark

          public BookmarkDetailsValidator hasBookmark()

      This method verifies that a PDF document has one or more bookmarks. It returns a validator class, which provides more methods to validate a single bookmark.

    - #### hasBookmarks

          public AllBookmarksValidator hasBookmarks()

      This method verifies that a PDF document has one ore more bookmarks. It returns a validator class which provides validation methods for bookmarks.

    - #### hasCreationDate

          public DateValidator hasCreationDate()

      This method returns a validator which provides validation methods for dates.

    - #### hasCreator

          public PropertyValidator hasCreator()

      This method returns a validator which provides validation methods for the document creator.

    - #### hasEmbeddedFile

          public EmbeddedFileValidator hasEmbeddedFile()

      This method returns a validator which provides validation methods for embedded files.

    - #### hasEncryptionLength

          public DocumentValidator hasEncryptionLength(int expectedEncryptionLength)

      This method does what the name suggests.

    - #### hasField

          @Guarded
          public SingleFieldValidator hasField(java.lang.String fieldname)

      This method does what the name suggests.

    - #### hasFields

          public AllFieldsValidator hasFields()

      This method does what the name suggests.

    - #### hasFields

          @Guarded
          public void hasFields(java.lang.String... fieldNames)

    - #### hasFont

          public FontNameValidator hasFont()

      This method prepares the validation for one font.

    - #### hasFonts

          public AllFontsValidator hasFonts()

      This method verifies that the current PDF document has fonts.

    - #### hasFormat

          @Guarded
          public DocumentValidator hasFormat(DocumentFormat expectedFormat)

      This method verifies the format against every page of a document.

    - #### hasFormat

          @Deprecated
          @Guarded
          public DocumentValidator hasFormat(DocumentFormat expectedFormat,
                                                       PagesToUse pagesToUse)

      Deprecated.
      This method verifies the format against that pages, which are given by the second parameter.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasFormat(format, pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasFormat(format)`.

    - #### hasImage

          @Guarded
          public ImageValidator hasImage()

      This method checks that images exist on every effected pages.

    - #### hasImage

          @Deprecated
          @Guarded
          public ImageValidator hasImage(PagesToUse pagesToUse)

      Deprecated.
      This method checks that images exist on every effected pages.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasImage(pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasImage()`.

    - #### hasImage

          @Deprecated
          @Guarded
          public ImageValidator hasImage(PagesToUse pagesToUse,
                                                   PageRegion region)

      Deprecated.
      This method checks that images exist in the given region on every effected pages.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasImage(pagesToUse, region)` use `AssertThat.document(filename).restrictedTo(pagesToUse).restrictedTo(region).hasImage()`.

    - #### hasJavaScript

          public JavaScriptValidator hasJavaScript()

      This method verifies that the current PDF document has document level JavaScript.

      To check whether a JavaScript function belongs to an action, use `hasJavaScriptAction()`

    - #### hasJavaScriptAction

          public JavaScriptActionValidator hasJavaScriptAction()

    - #### hasKeywords

          public PropertyValidator hasKeywords()

      This method verifies the existence of keywords.

      The term in plural is intended, because it is a term inside PDF documents.

    - #### hasLanguageInfo

          @Guarded
          public DocumentValidator hasLanguageInfo(java.lang.String expectedLocale)

      This method checks the expected language and country information against the data of the PDF document. The allowed format is "language-country" or "language_country". Examples: "en-GB", "de_DE", "ru_RU".

      This method works 'not case sensitive'.

      Parameters:
        `expectedLocale` - "de-DE" oder "de_DE"
      See Also:
        `hasLanguageInfo(Locale)`

    - #### hasLanguageInfo

          @Guarded
          public DocumentValidator hasLanguageInfo(java.util.Locale expectedLocale)

      This method does what the name suggests.
      See Also:
        `hasLanguageInfo(String)`

    - #### hasLayer

          public LayerNameValidator hasLayer()

      This method verifies whether a PDF document uses layers. This method is functionally the same, as hasOCG().

    - #### hasLayers

          public AllLayersValidator hasLayers()

      This method does what the name suggests.

    - #### hasLessPagesThan

          @Guarded
          public DocumentValidator hasLessPagesThan(int maximumNumberExclusive)

      This method does what the name suggests.

    - #### hasLocalGotoAction

          public GotoLocalActionValidator hasLocalGotoAction()

      This method does what the name suggests.

    - #### hasModificationDate

          public DateValidator hasModificationDate()

      This method does what the name suggests.

    - #### hasMorePagesThan

          @Guarded
          public DocumentValidator hasMorePagesThan(int minimumNumberExclusive)

      This method does what the name suggests.

    - #### hasNamedDestination

          public NamedDestinationValidator hasNamedDestination()

      This method does what the name suggests.

    - #### hasNoAuthor

          public DocumentValidator hasNoAuthor()

      This method does what the name suggests.

    - #### hasNoCreationDate

          public DocumentValidator hasNoCreationDate()

      This method does what the name suggests.

    - #### hasNoCreator

          public DocumentValidator hasNoCreator()

      This method does what the name suggests.

    - #### hasNoImage

          public DocumentValidator hasNoImage()

    - #### hasNoLanguageInfo

          public DocumentValidator hasNoLanguageInfo()

      This method does what the name suggests.

    - #### hasNoKeywords

          public DocumentValidator hasNoKeywords()

      This method does what the name suggests.

    - #### hasNoModificationDate

          public DocumentValidator hasNoModificationDate()

      This method does what the name suggests.

    - #### hasNoProducer

          public DocumentValidator hasNoProducer()

      This method does what the name suggests.

    - #### hasNoProperty

          @Guarded
          public DocumentValidator hasNoProperty(java.lang.String key)

      This method verifies that the current PDF document does not have the property with the key equals to the given parameter.

    - #### hasNoSubject

          public DocumentValidator hasNoSubject()

      This method does what the name suggests.

    - #### hasNoText

          @Guarded
          public void hasNoText()

    - #### hasNoText

          @Deprecated
          @Guarded
          public void hasNoText(PagesToUse pagesToUse)

      Deprecated.
      This method checks that no text exists in the predefined pages.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasNoText(pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasNoText()`.

    - #### hasNoText

          @Deprecated
          @Guarded
          public void hasNoText(PagesToUse pagesToUse,
                                          PageRegion region)

      Deprecated.
      This method checks that no text exists in the predefined pages and regions.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasNoText(pagesToUse, region)` use `AssertThat.document(filename).restrictedTo(pagesToUse).restrictedTo(region).hasNoText()`.

    - #### hasNoTitle

          public DocumentValidator hasNoTitle()

      This method does what the name suggests.

    - #### hasNoXFAData

          public DocumentValidator hasNoXFAData()

    - #### hasNoXMPData

          public DocumentValidator hasNoXMPData()

    - #### hasNumberOfActions

          @Guarded
          public DocumentValidator hasNumberOfActions(int expectedNumber)

    - #### hasNumberOfBookmarks

          @Guarded
          public DocumentValidator hasNumberOfBookmarks(int expectedNumber)

      This method does what the name suggests.

    - #### hasNumberOfDifferentImages

          @Guarded
          public DocumentValidator hasNumberOfDifferentImages(int expectedNumber)

      This method compares the number of different images of a PDF document with the number, given by the parameter.

    - #### hasNumberOfDifferentImages

          @Deprecated
          @Guarded
          public DocumentValidator hasNumberOfDifferentImages(int expectedNumber,
                                                                        PagesToUse pagesToUse)

      Deprecated.
      This method checks the number of different images on the specified pages.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasNumberOfDifferentImages(nr, pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasNumberOfDifferentImages(nr)`.

    - #### hasNumberOfDifferentImages

          @Deprecated
          @Guarded
          public DocumentValidator hasNumberOfDifferentImages(int expectedNumber,
                                                                        PagesToUse pagesToUse,
                                                                        PageRegion region)

      Deprecated.
      This method checks the number of different images in a region of the specified pages.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasNumberOfDifferentImages(nr, pagesToUse, region)` use `AssertThat.document(filename).restrictedTo(pagesToUse).restrictedTo(region).hasNumberOfDifferentImages(nr)`.

    - #### hasNumberOfEmbeddedFiles

          @Guarded
          public DocumentValidator hasNumberOfEmbeddedFiles(int expectedNumber)

      This method does what the name suggests.

    - #### hasNumberOfFields

          @Guarded
          public DocumentValidator hasNumberOfFields(int expectedNumber)

      This method does what the name suggests.

    - #### hasNumberOfFonts

          @Guarded
          public DocumentValidator hasNumberOfFonts(int expectedNumber,
                                                   IdentifiedBy filter)

      This method does what the name suggests.

    - #### hasNumberOfLayers

          @Guarded
          public DocumentValidator hasNumberOfLayers(int expectedNumber)

      This method returns the number of layers (optional content groups). The function is identical with `hasNumberOfOCGs(int)`.

    - #### hasNumberOfOCGs

          @Guarded
          public DocumentValidator hasNumberOfOCGs(int expectedNumber)

      The function is identical with hasNumberOfLayers().
      See Also:
        `hasNumberOfLayers(int)`

    - #### hasNumberOfPages

          @Guarded
          public DocumentValidator hasNumberOfPages(int expectedNumber)

      This method does what the name suggests.

    - #### hasNumberOfSignatures

          @Guarded
          public DocumentValidator hasNumberOfSignatures(int expectedNumber)

      This method verifies the given number of expected signatures.

    - #### hasNumberOfVisibleImages

          @Guarded
          public DocumentValidator hasNumberOfVisibleImages(int expectedNumber)

      This method checks the number of visible images of a PDF document with the expected sum, given by the parameter.

      Images like logo's that appear on different pages of the document are counted multiple times.

    - #### hasNumberOfVisibleImages

          @Deprecated
          @Guarded
          public DocumentValidator hasNumberOfVisibleImages(int expectedNumber,
                                                                      PagesToUse pagesToUse)

      Deprecated.
      This method checks the number of visible images on the pages, given by the second parameter, and compares it with the expected sum, given by the first parameter.

      Images like logo's which appear on different pages of the document are counted multiple times.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasNumberOfVisibleImages(nr, pagesToUse)` use `AssertThat.document(filename).restrictedTo(pagesToUse).hasNumberOfVisibleImages(nr)`.

    - #### hasNumberOfVisibleImages

          @Deprecated
          @Guarded
          public DocumentValidator hasNumberOfVisibleImages(int expectedNumber,
                                                                      PagesToUse pagesToUse,
                                                                      PageRegion region)

      Deprecated.
      This method checks the number of visible images in a region of the specified pages.

      This method is deprecated because the style of the fluent API changed. Instead of `AssertThat.document(filename).hasNumberOfVisibleImages(nr, pagesToUse, region)` use `AssertThat.document(filename).restrictedTo(pagesToUse).restrictedTo(region).hasNumberOfVisibleImages(nr)`.

    - #### hasOCG

          public LayerNameValidator hasOCG()

      This method verifies whether a PDF document uses layers. This method is functionally the same, as hasLayer().

    - #### hasOCGs

          public AllLayersValidator hasOCGs()

      This method verifies whether a PDF document uses layers. This method is functionally the same, as hasLayer().
      See Also:
        `hasLayers()`

    - #### hasOwnerPassword

          @Guarded
          public DocumentValidator hasOwnerPassword(java.lang.String expectedPassword)

      This method checks that the current document can be opened with the password given by the parameter. This method throws a PDFUnitValidationException when it will be invoked with an user password.

    - #### hasPermission

          public PermissionValidator hasPermission()

      This method prepares the validation of permissions of the current PDF documents.

    - #### hasProducer

          public PropertyValidator hasProducer()

      This method does what the name suggests.

    - #### hasProperty

          @Guarded
          public PropertyValidator hasProperty(java.lang.String key)

      This method verifies that the current PDF document has a property with the key equals to the given parameter.

    - #### hasSignatureField

          @Guarded
          public SignatureFieldValidator hasSignatureField(java.lang.String fieldName)

      This method checks that a signature field with the given name exists.

    - #### hasSignatureFields

          public AllSignaturesValidator hasSignatureFields()

      This method verifies that a document has at least one signature field and prepares all signature fields for further checks.

    - #### hasSubject

          public PropertyValidator hasSubject()

      This method does what the name suggests.

    - #### hasText

          public TextValidator hasText()

      This method prepares the validation of text for the previously defined pages and regions.

    - #### hasText

          @Deprecated
          @Guarded
          public TextValidator hasText(PagesToUse pagesToUse)

      Deprecated.
      This method prepares the validation of text for every page in effect, defined by the first parameter.

      This method is deprecated because the style of the fluent API changed. Use AssertThat.document(..).restrictedTo(PagesToUse).hasText() instead of this method.

    - #### hasText

          @Deprecated
          @Guarded
          public TextValidator hasText(PagesToUse pagesToUse,
                                                 PageRegion region)

      Deprecated.
      This method prepares the validation of text for every page in effect, defined by the first parameter, reduced to a section of every page, defined by the second parameter.

      This method is deprecated because the style of the fluent API changed. Use AssertThat.document(..).restrictedTo(PagesToUse).restrictedTo(PageRegionUpperLeftBased).hasText() instead of this method.

    - #### hasTitle

          public PropertyValidator hasTitle()

      This method does what the name suggests.

    - #### hasUserPassword

          @Guarded
          public DocumentValidator hasUserPassword(java.lang.String expectedPassword)

      This method checks that the current document can be opened with the password given by the parameter. This method throws a PDFUnitValidationException when it will be invoked with an owner password.

    - #### hasVersion

          public VersionValidator hasVersion()

      This method does what the name suggests.

    - #### hasXFAData

          public XFAValidator hasXFAData()

    - #### hasXMPData

          public XMPValidator hasXMPData()

    - #### hasZugferdData

          public ZugferdValidator hasZugferdData()

    - #### isCertified

          public DocumentValidator isCertified()

      Verifying that a PDF is certified.

    - #### isCertifiedFor

          @Guarded
          public DocumentValidator isCertifiedFor(CertificationLevel expectedCertificationLevel)

      Verifying that the certification level of the current PDF document is equal to the expected certification level.

    - #### isLinearizedForFastWebView

          public DocumentValidator isLinearizedForFastWebView()

    - #### isSigned

          public DocumentValidator isSigned()

      This method does what the name suggests.

    - #### isSignedBy

          public DocumentValidator isSignedBy(java.lang.String expectedSignatory)

    - #### isTagged

          public TaggingValidator isTagged()

    - #### restrictedTo

          @Guarded
          public PageValidator restrictedTo(PagesToUse pagesToUse)

      This method sets a page filter for the following validation process.

Copyright (C) PDFUnit.com. See here for license.