Class Exclusions


  • public class Exclusions
    extends Object
    Exclusions collect rectangular areas of the document, that shall be ignored during comparison. Each area is specified through a PageArea object.

    Exclusions can be read from a file in JSON format (or actually a superset called HOCON) which has the following form:

     exclusions: [
         {
             page: 2
             x1: 300 // entries without a unit are in pixels, when Pdf is rendered at 300DPI
             y1: 1000
             x2: 550
             y2: 1300
         },
         {
             // page is optional. When not given, the exclusion applies to all pages.
             x1: 130.5mm // entries can also be given in units of cm, mm or pt (DTP-Point defined as 1/72 Inches)
             y1: 3.3cm
             x2: 190mm
             y2: 3.7cm
         },
         {
             page: 7
             // coordinates are optional. When not given, the whole page is excluded.
         }
     ]
    • Constructor Detail

      • Exclusions

        public Exclusions​(Environment environment)
    • Method Detail

      • readExclusions

        public void readExclusions​(String filename)
      • readExclusions

        public void readExclusions​(Path path)
      • readExclusions

        public void readExclusions​(File file)
      • readExclusions

        public void readExclusions​(InputStream inputStream)
      • readExclusions

        public void readExclusions​(Reader reader)
      • asJson

        public String asJson()