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.endingWith(java.lang.String expectedEnd)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasEncryptionLength(int expectedEncryptionLength)
Verifying that the current PDF document is encrypted with the
expected key length.
|
DocumentValidator |
DocumentValidator.hasLessPagesThan(int maximumNumberExclusive)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasLocale(java.util.Locale expectedLocale)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasLocale(java.lang.String expectedLocale)
This method checks the expected language and country information against
the data of the PDF document.
|
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.hasNoKeywords()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoLocale()
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.
|
DocumentValidator |
DocumentValidator.hasNoSubject()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoTitle()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoXFAData()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNoXMPData()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfActions(int expectedNumber)
This method does what the name suggests.
|
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.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.hasNumberOfJavaScriptActions(int expectedNumber)
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfLayers(int expectedNumber)
The function is identical with hasNumberOfOptionalContentGroups().
|
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 does what the name suggests.
|
DocumentValidator |
DocumentValidator.hasNumberOfVisibleImages(int expectedNumber)
This method compares the number of visible images of a PDF document
with the expected sum, given by the parameter.
|
DocumentValidator |
DocumentValidator.hasNumberOfVisibleImages(int expectedNumber,
PagesToUse pagesToUse)
This method calculates 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.
|
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.hasTrappingInfo(TrappingInfo trappingInfo)
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(CertifiedFor expectedCertificationLevel)
Verifying that the certification level of the current PDF document is equal to the
expected certification level.
|
DocumentValidator |
DocumentValidator.isLinearizedForFastWebView()
This method does what the name suggests.
|
DocumentValidator |
DocumentValidator.isSigned()
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.matchingComplete(java.lang.String expectedValue)
This method does what the name suggests.
|
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.
|
protected DocumentValidator |
PropertyValidator.notNoProperty(java.lang.String key)
This method does what the name suggests.
|
DocumentValidator |
PropertyValidator.startingWith(java.lang.String expectedStart)
This method does what the name suggests.
|
Constructor and Description |
---|
AuthorValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
CreatorValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
KeywordsValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
ProducerValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
PropertyValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
SubjectValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
TitleValidator(com.pdfunit.internal.spi.IDocument pdfDocument,
DocumentValidator documentValidator) |
Copyright (C) PDFUnit.com. See here for license.