Package | Description |
---|---|
com.pdfunit |
This is the main package for testing PDF documents.
|
com.pdfunit.validators |
Classes implementing validations on specific topics of PDF.
|
Modifier and Type | Method and Description |
---|---|
static DocumentValidator |
AssertThat.document(byte[] pdfAsBytes)
Loading a PDF document from a byte array representing a PDF document.
|
static DocumentValidator |
AssertThat.document(byte[] pdfAsBytes,
java.lang.String password)
Loading an encrypted PDF document from a byte array representing a PDF document.
|
static DocumentValidator |
AssertThat.document(java.io.File file)
Loading a PDF document from a file.
|
static DocumentValidator |
AssertThat.document(java.io.File file,
java.lang.String password)
Loading an encrypted PDF document from a file.
|
static DocumentValidator |
AssertThat.document(java.io.InputStream stream)
Loading a PDF document from an input stream.
|
static DocumentValidator |
AssertThat.document(java.io.InputStream stream,
java.lang.String password)
Loading an encrypted PDF document from an input stream.
|
static DocumentValidator |
AssertThat.document(java.lang.String filename)
Loading a PDF document from a file.
|
static DocumentValidator |
AssertThat.document(java.lang.String filename,
java.lang.String password)
Loading an encrypted PDF document from a file.
|
static DocumentValidator |
AssertThat.document(java.net.URL url)
Loading a PDF document from an URL.
|
static DocumentValidator |
AssertThat.document(java.net.URL url,
java.lang.String password)
Loading an encrypted PDF document from an URL.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<DocumentValidator> |
MultiDocumentPropertyValidator.documentValidators |
Modifier and Type | Method and Description |
---|---|
DocumentValidator |
PropertyValidator.containing(java.lang.String expectedContent)
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.containing(java.lang.String expectedContent,
WhitespaceProcessing whitespaceProcessing)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.containsImage(java.io.File imageFile,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
DocumentValidator.containsImage(java.io.InputStream imageStream,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
DocumentValidator.containsImage(java.lang.String imageFileName,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
DocumentValidator.containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages)
This method verifies that one of the given images is present on the previously defined pages.
|
DocumentValidator |
DocumentValidator.containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
PropertyValidator.endingWith(java.lang.String expectedEnd)
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.equalsTo(java.lang.String expectedValue)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasEncryptionLength(int expectedEncryptionLength)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasFormat(DocumentFormat expectedFormat)
This method verifies the format against every page of a document.
|
DocumentValidator |
DocumentValidator.hasFormat(DocumentFormat expectedFormat,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
DocumentValidator.hasLanguageInfo(java.util.Locale expectedLocale)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasLanguageInfo(java.lang.String expectedLocale)
This method checks the expected language and country information against
the data of the PDF document.
|
DocumentValidator |
DocumentValidator.hasLessPagesThan(int maximumNumberExclusive)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasMorePagesThan(int minimumNumberExclusive)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoAuthor()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoCreationDate()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoCreator()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoImage() |
DocumentValidator |
PageValidator.hasNoImage() |
DocumentValidator |
DocumentValidator.hasNoKeywords()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoLanguageInfo()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoModificationDate()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoProducer()
This method does what the name suggests.
|
DocumentValidator |
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.
|
protected DocumentValidator |
PropertyValidator.hasNoProperty(java.lang.String key)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoSubject()
This method does what the name suggests.
|
DocumentValidator |
PageValidator.hasNoText() |
DocumentValidator |
DocumentValidator.hasNoTitle()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoXFAData() |
DocumentValidator |
DocumentValidator.hasNoXMPData() |
DocumentValidator |
DocumentValidator.hasNumberOfActions(int expectedNumber) |
DocumentValidator |
DocumentValidator.hasNumberOfBookmarks(int expectedNumber)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfDifferentImages(int expectedNumber)
This method compares the number of different images of a PDF document
with the number, given by the parameter.
|
DocumentValidator |
DocumentValidator.hasNumberOfDifferentImages(int expectedNumber,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
DocumentValidator.hasNumberOfDifferentImages(int expectedNumber,
PagesToUse pagesToUse,
PageRegion region)
Deprecated.
|
DocumentValidator |
DocumentValidator.hasNumberOfEmbeddedFiles(int expectedNumber)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfFields(int expectedNumber)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfFonts(int expectedNumber,
IdentifiedBy filter)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfLayers(int expectedNumber)
This method returns the number of layers (optional content groups).
|
DocumentValidator |
DocumentValidator.hasNumberOfOCGs(int expectedNumber)
The function is identical with hasNumberOfLayers().
|
DocumentValidator |
DocumentValidator.hasNumberOfPages(int expectedNumber)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfSignatures(int expectedNumber)
This method verifies the given number of expected signatures.
|
DocumentValidator |
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 |
DocumentValidator.hasNumberOfVisibleImages(int expectedNumber,
PagesToUse pagesToUse)
Deprecated.
|
DocumentValidator |
DocumentValidator.hasNumberOfVisibleImages(int expectedNumber,
PagesToUse pagesToUse,
PageRegion region)
Deprecated.
|
DocumentValidator |
DocumentValidator.hasOwnerPassword(java.lang.String expectedPassword)
This method checks that the current document can be opened with the password given
by the parameter.
|
protected DocumentValidator |
PropertyValidator.hasProperty(java.lang.String key)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasUserPassword(java.lang.String expectedPassword)
This method checks that the current document can be opened with the password given
by the parameter.
|
DocumentValidator |
DocumentValidator.isCertified()
Verifying that a PDF is certified.
|
DocumentValidator |
DocumentValidator.isCertifiedFor(CertificationLevel expectedCertificationLevel)
Verifying that the certification level of the current PDF document is equal to the
expected certification level.
|
DocumentValidator |
DocumentValidator.isLinearizedForFastWebView() |
DocumentValidator |
DocumentValidator.isSigned()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.isSignedBy(java.lang.String expectedSignatory) |
DocumentValidator |
PageValidator.isSignedBy(java.lang.String expectedSignatory) |
DocumentValidator |
PropertyValidator.matchingRegex(java.lang.String regex)
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.notContaining(java.lang.String notExpectedContent)
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.notMatchingRegex(java.lang.String regex)
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.startingWith(java.lang.String expectedStart)
This method does what the name suggests.
|
DocumentValidator |
FontNameValidator.withNameContaining(java.lang.String expectedName)
This method verifies that the expected name is part of the
current font name.
|
DocumentValidator |
FontNameValidator.withNameNotContaining(java.lang.String expectedName)
This method verifies that the expected name is not part of the
current font name.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector<DocumentValidator> |
MultiDocumentValidator.getValdiatorCollection() |
Constructor and Description |
---|
MultiDocumentValidator(java.util.Vector<DocumentValidator> validatorCollection)
This constructor is the entry to all tests belonging to a set of PDF documents.
|
Copyright (C) PDFUnit.com. See here for license.