Package com._4point.testing.matchers.aem
Class PdfMatchers
java.lang.Object
com._4point.testing.matchers.aem.PdfMatchers
Matchers to perform tests in PDFs
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasAtLeastTheseEmbeddedFonts(String... fontNames) Creates a Matcher that matches a list of names against the list of embedded fonts in the PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasAtLeastTheseFonts(String... fontNames) Creates a Matcher that matches a list of names against the list of fonts in the PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> HasEmbeddedFonts(org.hamcrest.Matcher<Iterable<? super String>> matcher) Creates a Matcher that tests the list of names of embedded fonts in the PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasExactlyTheseEmbeddedFonts(String... fontNames) Creates a Matcher that matches a list of names against the list of embedded fonts in the PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasExactlyTheseFonts(String... fontNames) Creates a Matcher that matches a list of names against the list of fonts in the PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> Creates a Matcher that tests the list of font names in the PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasXfa(boolean hasXfa) Creates a Matcher that tests whether a PDF is an XFA PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> Creates a Matcher that validates that a PDF is a dynamic PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> Creates a Matcher that validates that a PDF is interactive.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> Creates a Matcher that validates that a PDF is non-interactive.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isStatic()Creates a Matcher that validates that a PDF is a static PDF.static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isTagged()Creates a Matcher that validates that a PDF is a tagged PDF.
-
Method Details
-
isInteractive
Creates a Matcher that validates that a PDF is interactive.- Returns:
- the matcher
-
isNonInteractive
Creates a Matcher that validates that a PDF is non-interactive.- Returns:
- the matcher
-
isDynamic
Creates a Matcher that validates that a PDF is a dynamic PDF.- Returns:
- the matcher
-
isStatic
Creates a Matcher that validates that a PDF is a static PDF.- Returns:
- the matcher
-
isTagged
Creates a Matcher that validates that a PDF is a tagged PDF.- Returns:
- the matcher
-
hasXfa
Creates a Matcher that tests whether a PDF is an XFA PDF.- Parameters:
hasXfa- indicated whether the PDF should or should not contain XFA.- Returns:
- the matcher
-
hasFonts
public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasFonts(org.hamcrest.Matcher<Iterable<? super String>> matcher) Creates a Matcher that tests the list of font names in the PDF.- Parameters:
matcher- matcher that tests the list of fonts in the PDF.- Returns:
- the matcher
-
hasExactlyTheseFonts
Creates a Matcher that matches a list of names against the list of fonts in the PDF. It must be an exact match.- Parameters:
fontNames- the expected list of fonts in the PDF.- Returns:
- the matcher
-
hasAtLeastTheseFonts
Creates a Matcher that matches a list of names against the list of fonts in the PDF. It allows additional fonts to also be present.- Parameters:
fontNames- the expected list of fonts in the PDF.- Returns:
- the matcher
-
HasEmbeddedFonts
public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> HasEmbeddedFonts(org.hamcrest.Matcher<Iterable<? super String>> matcher) Creates a Matcher that tests the list of names of embedded fonts in the PDF.- Parameters:
matcher- matcher that tests the list of embedded fonts in the PDF.- Returns:
- the matcher
-
hasExactlyTheseEmbeddedFonts
public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasExactlyTheseEmbeddedFonts(String... fontNames) Creates a Matcher that matches a list of names against the list of embedded fonts in the PDF. It must be an exact match.- Parameters:
fontNames- the expected list of embedded fonts in the PDF.- Returns:
- the matcher
-
hasAtLeastTheseEmbeddedFonts
public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasAtLeastTheseEmbeddedFonts(String... fontNames) Creates a Matcher that matches a list of names against the list of embedded fonts in the PDF. It allows additional fonts to also be present.- Parameters:
fontNames- the expected list of embedded fonts in the PDF.- Returns:
- the matcher
-