Class PdfMatchers

java.lang.Object
com._4point.testing.matchers.aem.PdfMatchers

public class PdfMatchers extends Object
Matchers to perform tests in PDFs
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf>
    Creates a Matcher that matches a list of names against the list of embedded fonts in the PDF.
    static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf>
    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>
    Creates a Matcher that matches a list of names against the list of embedded fonts in the PDF.
    static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf>
    Creates a Matcher that matches a list of names against the list of fonts in the PDF.
    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.
    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>
    Creates a Matcher that validates that a PDF is a static PDF.
    static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf>
    Creates a Matcher that validates that a PDF is a tagged PDF.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isInteractive

      public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isInteractive()
      Creates a Matcher that validates that a PDF is interactive.
      Returns:
      the matcher
    • isNonInteractive

      public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isNonInteractive()
      Creates a Matcher that validates that a PDF is non-interactive.
      Returns:
      the matcher
    • isDynamic

      public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isDynamic()
      Creates a Matcher that validates that a PDF is a dynamic PDF.
      Returns:
      the matcher
    • isStatic

      public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isStatic()
      Creates a Matcher that validates that a PDF is a static PDF.
      Returns:
      the matcher
    • isTagged

      public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> isTagged()
      Creates a Matcher that validates that a PDF is a tagged PDF.
      Returns:
      the matcher
    • hasXfa

      public static org.hamcrest.TypeSafeDiagnosingMatcher<Pdf> hasXfa(boolean 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

      public 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. It must be an exact match.
      Parameters:
      fontNames - the expected list of fonts in the PDF.
      Returns:
      the matcher
    • hasAtLeastTheseFonts

      public 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. 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