Constructor and Description |
---|
DocumentValidator(com.pdfunit.internal.spi.IDocument pdfDocument)
This constructor is the entry to all tests.
|
Modifier and Type | Method and Description |
---|---|
CompareValidator |
and(byte[] byteArrayMaster)
This method creates an instance of an validator, which provides many methods,
to compare a test-PDF with a master-PDF.
|
CompareValidator |
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.
|
CompareValidator |
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.
|
CompareValidator |
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.
|
CompareValidator |
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.
|
CompareValidator |
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.
|
CompareValidator |
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.
|
CompareValidator |
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.
|
CompareValidator |
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)
This method prepareds the validation of PDF pages as rendered images.
|
ImageValidator |
containsImage(java.io.File imageFile,
PagesToUse pagesToUse)
This method verifies that the given image is present on every page, defined by
the second parameter.
|
ImageValidator |
containsImage(java.io.InputStream imageStream,
PagesToUse pagesToUse)
This method verifies that the given image is present on every page in effect.
|
ImageValidator |
containsImage(java.lang.String imageFileName,
PagesToUse pagesToUse)
This method verifies that the given image is present on every page, defined by
the second parameter.
|
ImageValidator |
containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages,
PagesToUse pagesToUse)
This method verifies that one of the given images is present on the pages that are
defined by the second parameter.
|
AnyActionValidator |
hasAnyAction()
This method does what the name suggests.
|
AuthorValidator |
hasAuthor()
This method does what the name suggests.
|
BookmarkDetailsValidator |
hasBookmark()
This method verifies that a PDF document has one or more bookmarks.
|
BookmarkValidator |
hasBookmarks()
This method verifies that a PDF document has one ore more bookmarks.
|
ChainedActionValidator |
hasChainedAction()
This method does what the name suggests.
|
DocumentCloseActionValidator |
hasCloseAction()
This method does what the name suggests.
|
TextValidator |
hasContent(PagesToUse pagesToUse)
Deprecated.
Use hasText(PagesToUse) instead.
The name of this method is not clear enough.
|
TextValidator |
hasContent(PagesToUse pagesToUse,
ClippingArea clippingArea)
Deprecated.
Use hasText(PagesToUse, ClippingArea) instead.
The name of this method is not clear enough.
|
DateValidator |
hasCreationDate()
This method does what the name suggests.
|
CreatorValidator |
hasCreator()
This method does what the name suggests.
|
EmbeddedFileValidator |
hasEmbeddedFile()
This method does what the name suggests.
|
DocumentValidator |
hasEncryptionLength(int expectedEncryptionLength)
Verifying that the current PDF document is encrypted with the
expected key length.
|
SingleFieldValidator |
hasField(java.lang.String fieldname)
This method does what the name suggests.
|
AllFieldsValidator |
hasFields()
This method does what the name suggests.
|
FontNameValidator |
hasFont()
This method prepares the validation for one font.
|
FontValidator |
hasFonts()
This method verifies that the current PDF document has fonts.
|
FormatValidator |
hasFormat(DocumentFormat expectedFormat)
This method verifies the format against every page of a document.
|
FormatValidator |
hasFormat(DocumentFormat expectedFormat,
PagesToUse pagesToUse)
This method verifies the format against that pages, given by the
second parameter.
|
ImportDataActionValidator |
hasImportDataAction() |
JavaScriptValidator |
hasJavaScript()
This method verifies that the current PDF document has embedded JavaScript.
|
JavaScriptActionValidator |
hasJavaScriptAction()
This method does what the name suggests.
|
KeywordsValidator |
hasKeywords()
This method verifies the existence of keywords.
|
LaunchActionValidator |
hasLaunchAction()
This method does what the name suggests.
|
LayerNameValidator |
hasLayer()
This method verifies whether a PDF document uses layers.
|
LayerValidator |
hasLayers()
This method does what the name suggests.
|
DocumentValidator |
hasLessPagesThan(int maximumNumberExclusive)
This method does what the name suggests.
|
DocumentValidator |
hasLocale(java.util.Locale expectedLocale)
This method does what the name suggests.
|
DocumentValidator |
hasLocale(java.lang.String expectedLocale)
This method checks the expected language and country information against
the data of the PDF document.
|
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.
|
NamedActionValidator |
hasNamedAction() |
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 |
hasNoKeywords()
This method does what the name suggests.
|
DocumentValidator |
hasNoLocale()
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.
|
boolean |
hasNoText(PagesToUse pagesToUse) |
boolean |
hasNoText(PagesToUse pagesToUse,
ClippingArea clippingArea) |
DocumentValidator |
hasNoTitle()
This method does what the name suggests.
|
DocumentValidator |
hasNoXFAData()
This method does what the name suggests.
|
DocumentValidator |
hasNoXMPData()
This method does what the name suggests.
|
DocumentValidator |
hasNumberOfActions(int expectedNumber)
This method does what the name suggests.
|
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 |
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 |
hasNumberOfJavaScriptActions(int expectedNumber)
This method does what the name suggests.
|
DocumentValidator |
hasNumberOfLayers(int expectedNumber)
The function is identical with hasNumberOfOptionalContentGroups().
|
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 does what the name suggests.
|
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 |
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.
|
LayerNameValidator |
hasOCG()
This method verifies whether a PDF document uses layers.
|
LayerValidator |
hasOCGs()
This method verifies whether a PDF document uses layers.
|
DocumentOpenActionValidator |
hasOpenAction()
This method does what the name suggests.
|
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.
|
DocumentPrintActionValidator |
hasPrintAction()
This method does what the name suggests.
|
ProducerValidator |
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.
|
GotoRemoteActionValidator |
hasRemoteGotoActionTo(java.lang.String expectedRemoteFile)
This method asserts that the current PDF document has a GOTO-Action with
the remote destination, given by the parameter.
|
ResetFormValidator |
hasResetFormAction() |
DocumentSaveActionValidator |
hasSaveAction()
This method does what the name suggests.
|
SignatureValidator |
hasSignature(java.lang.String signatureName)
This method checks whether the PDF document has a signature with
the given name.
|
SignatureXMLValidator |
hasSignatures()
This method does what the name suggests.
|
AllFieldsValidator |
hasSignedSignatureFields()
This method does what the name suggests.
|
SubjectValidator |
hasSubject()
This method does what the name suggests.
|
SubmitFormValidator |
hasSubmitFormAction() |
TextValidator |
hasText(PagesToUse pagesToUse)
This method prepares the validation of text for every page in effect,
defined by the first parameter.
|
TextValidator |
hasText(PagesToUse pagesToUse,
ClippingArea clippingArea)
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.
|
TitleValidator |
hasTitle()
This method does what the name suggests.
|
DocumentValidator |
hasTrappingInfo(TrappingInfo trappingInfo)
This method does what the name suggests.
|
AllFieldsValidator |
hasUnsignedSignatureFields()
This method does what the name suggests.
|
URIActionValidator |
hasURIAction()
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()
This method does what the name suggests.
|
XMPValidator |
hasXMPData()
This method does what the name suggests.
|
DocumentValidator |
isCertified()
Verifying that a PDF is certified.
|
DocumentValidator |
isCertifiedFor(CertifiedFor expectedCertificationLevel)
Verifying that the certification level of the current PDF document is equal to the
expected certification level.
|
DocumentValidator |
isLinearizedForFastWebView()
This method does what the name suggests.
|
DocumentValidator |
isSigned()
This method does what the name suggests.
|
TaggingValidator |
isTagged()
This method does what the name suggests.
|
public DocumentValidator(com.pdfunit.internal.spi.IDocument pdfDocument)
public VersionValidator hasVersion()
@Guarded public DocumentValidator hasTrappingInfo(TrappingInfo trappingInfo)
@Guarded public DocumentValidator hasEncryptionLength(int expectedEncryptionLength)
@Guarded public DocumentValidator hasNumberOfSignatures(int expectedNumber)
@Guarded public DocumentValidator hasNumberOfFields(int expectedNumber)
@Guarded public DocumentValidator hasNumberOfBookmarks(int expectedNumber)
@Guarded public DocumentValidator hasNumberOfJavaScriptActions(int expectedNumber)
@Guarded public DocumentValidator hasNumberOfActions(int expectedNumber)
@Guarded public DocumentValidator hasNumberOfFonts(int expectedNumber, IdentifiedBy filter)
@Guarded public DocumentValidator hasNumberOfDifferentImages(int expectedNumber)
@Guarded public DocumentValidator hasNumberOfVisibleImages(int expectedNumber)
Images like Logo's that appear on different pages of the document are counted multiple times.
@Guarded public DocumentValidator hasNumberOfVisibleImages(int expectedNumber, PagesToUse pagesToUse)
Images like logo's that appear on different pages of the document are counted multiple times.
@Guarded public DocumentValidator hasNumberOfOCGs(int expectedNumber)
hasNumberOfLayers(int)
@Guarded public DocumentValidator hasNumberOfLayers(int expectedNumber)
hasNumberOfOCGs(int)
@Guarded public DocumentValidator hasNumberOfPages(int expectedNumber)
@Guarded public DocumentValidator hasLocale(java.lang.String expectedLocale)
This method works 'not case sensitive'.
expectedLocale
- "de-DE" oder "de_DE"hasLocale(Locale)
@Guarded public DocumentValidator hasLocale(java.util.Locale expectedLocale)
hasLocale(String)
public DocumentValidator hasNoLocale()
public DateValidator hasCreationDate()
public DocumentValidator hasNoCreationDate()
public DateValidator hasModificationDate()
public DocumentValidator hasNoModificationDate()
@Guarded public FormatValidator hasFormat(DocumentFormat expectedFormat)
@Guarded public FormatValidator hasFormat(DocumentFormat expectedFormat, PagesToUse pagesToUse)
@Guarded public ImageValidator containsImage(java.io.File imageFile, PagesToUse pagesToUse)
@Guarded public ImageValidator containsImage(java.lang.String imageFileName, PagesToUse pagesToUse)
@Guarded public ImageValidator containsImage(java.io.InputStream imageStream, PagesToUse pagesToUse)
@Guarded public ImageValidator containsOneImageOf(java.awt.image.BufferedImage[] allPossibleImages, PagesToUse pagesToUse)
public DocumentValidator isCertified()
@Guarded public DocumentValidator isCertifiedFor(CertifiedFor expectedCertificationLevel)
@Guarded public DocumentValidator hasUserPassword(java.lang.String expectedPassword)
@Guarded public DocumentValidator hasOwnerPassword(java.lang.String expectedPassword)
@Guarded public DocumentValidator hasNumberOfEmbeddedFiles(int expectedNumber)
public EmbeddedFileValidator hasEmbeddedFile()
public LayerValidator hasLayers()
public LayerValidator hasOCGs()
hasLayers()
public LayerNameValidator hasLayer()
public LayerNameValidator hasOCG()
public NamedDestinationValidator hasNamedDestination()
public DocumentValidator isSigned()
public XFAValidator hasXFAData()
public DocumentValidator hasNoXFAData()
public XMPValidator hasXMPData()
public DocumentValidator hasNoXMPData()
public JavaScriptValidator hasJavaScript()
To check whether a JavaScript function belongs to an action, see
JavaScriptActionValidator
JavaScriptActionValidator
public JavaScriptActionValidator hasJavaScriptAction()
public AnyActionValidator hasAnyAction()
@Guarded public SingleFieldValidator hasField(java.lang.String fieldname)
public AllFieldsValidator hasFields()
public PermissionValidator hasPermission()
@Guarded public CompareValidator and(java.lang.String filenameMaster)
@Guarded public CompareValidator and(java.io.File fileMaster)
@Guarded public CompareValidator and(java.io.InputStream fisMaster)
@Guarded public CompareValidator and(java.net.URL urlMaster)
@Guarded public CompareValidator and(byte[] byteArrayMaster)
@Guarded public CompareValidator and(java.lang.String compareFilename, java.lang.String password)
@Guarded public CompareValidator and(java.io.InputStream fisMaster, java.lang.String password)
@Guarded public CompareValidator and(java.net.URL urlMaster, java.lang.String password)
@Guarded public CompareValidator and(byte[] byteArrayMaster, java.lang.String password)
@Guarded public TextValidator hasText(PagesToUse pagesToUse, ClippingArea clippingArea)
@Deprecated @Guarded public TextValidator hasContent(PagesToUse pagesToUse, ClippingArea clippingArea)
@Guarded public TextValidator hasText(PagesToUse pagesToUse)
@Deprecated @Guarded public TextValidator hasContent(PagesToUse pagesToUse)
@Guarded public RenderedPageValidator asRenderedPage(PagesToUse pagesToUse)
public CreatorValidator hasCreator()
public DocumentValidator hasNoCreator()
public TitleValidator hasTitle()
public DocumentValidator hasNoTitle()
public SubjectValidator hasSubject()
public DocumentValidator hasNoSubject()
public AuthorValidator hasAuthor()
public DocumentValidator hasNoAuthor()
public ProducerValidator hasProducer()
public DocumentValidator hasNoProducer()
public KeywordsValidator hasKeywords()
The term in plural is intended, because it is a term inside PDF documents.
public DocumentValidator hasNoKeywords()
public BookmarkDetailsValidator hasBookmark()
public BookmarkValidator hasBookmarks()
public LaunchActionValidator hasLaunchAction()
public URIActionValidator hasURIAction()
public DocumentOpenActionValidator hasOpenAction()
public DocumentPrintActionValidator hasPrintAction()
public DocumentCloseActionValidator hasCloseAction()
public DocumentSaveActionValidator hasSaveAction()
public ChainedActionValidator hasChainedAction()
@Guarded public GotoRemoteActionValidator hasRemoteGotoActionTo(java.lang.String expectedRemoteFile)
public GotoLocalActionValidator hasLocalGotoAction()
@Guarded public PropertyValidator hasProperty(java.lang.String key)
@Guarded public DocumentValidator hasNoProperty(java.lang.String key)
public FontNameValidator hasFont()
public FontValidator hasFonts()
@Guarded public SignatureValidator hasSignature(java.lang.String signatureName)
public SignatureXMLValidator hasSignatures()
public DocumentValidator isLinearizedForFastWebView()
public AllFieldsValidator hasSignedSignatureFields()
public AllFieldsValidator hasUnsignedSignatureFields()
public TaggingValidator isTagged()
@Guarded public DocumentValidator hasLessPagesThan(int maximumNumberExclusive)
@Guarded public DocumentValidator hasMorePagesThan(int minimumNumberExclusive)
public ImportDataActionValidator hasImportDataAction()
public NamedActionValidator hasNamedAction()
public SubmitFormValidator hasSubmitFormAction()
public ResetFormValidator hasResetFormAction()
@Guarded public boolean hasNoText(PagesToUse pagesToUse)
@Guarded public boolean hasNoText(PagesToUse pagesToUse, ClippingArea clippingArea)
Copyright (C) PDFUnit.com. See here for license.