com.pdfunit.filter.region

## Class PageRegion

- java.lang.Object
- - com.pdfunit.filter.region.PageRegion

- Direct Known Subclasses:
    ClippingArea

      @DoNotObfuscate
      public class PageRegion
      extends java.lang.Object

  This class defines a region of a PDF page. The origin (x=0, y=0) of the PDF document and of this region is the upper-left corner.
  Since:
    2016.05
  Author:
    Carsten Siedentop, January 2016

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PageRegion(int leftX, int upperY, int width, int height)` Creating a wrapper to hold a rectangle representing a section of a PDF page.
    `PageRegion(int leftX, int upperY, int width, int height, FormatUnit formatUnit)` Creating a wrapper to hold a rectangle representing a section of a PDF page.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PageRegion` | `createFullSizeFromDocument(byte[] document)` This method creates a clipping area instance for a full page of the given document.
    `static PageRegion` | `createFullSizeFromDocument(java.io.File file)` This method creates a clipping area instance for a full page of the given document.
    `static PageRegion` | `createFullSizeFromDocument(java.io.InputStream pdfAsStream)` This method creates a clipping area instance for a full page of the given document.
    `static PageRegion` | `createFullSizeFromDocument(java.lang.String fileName)` This method creates a clipping area instance for a full page of the given document.
    `static PageRegion` | `createFullSizeFromDocument(java.net.URL url)` This method creates a clipping area instance for a full page of the given document.
    `int` | `getHeightInPoints()`
    `int` | `getLeftXInPoints()`
    `java.lang.String` | `getName()`
    `java.awt.geom.Rectangle2D` | `getRectangleLowerLeftBasedPoints()`
    `java.awt.geom.Rectangle2D` | `getRectangleUpperLeftBasedPoints()`
    `int` | `getUpperYInPoints()`
    `int` | `getWidthInPoints()`
    `void` | `setName(java.lang.String name)`
    `void` | `setPageHeightInPoints(int heightInPoints)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PageRegion

          public PageRegion(int leftX,
                    int upperY,
                    int width,
                    int height)

      Creating a wrapper to hold a rectangle representing a section of a PDF page.

    - #### PageRegion

          @Guarded
          public PageRegion(int leftX,
                            int upperY,
                            int width,
                            int height,
                            FormatUnit formatUnit)

      Creating a wrapper to hold a rectangle representing a section of a PDF page.

  - ### Method Detail

    - #### createFullSizeFromDocument

          @Guarded
          public static PageRegion createFullSizeFromDocument(java.lang.String fileName)

      This method creates a clipping area instance for a full page of the given document. The format from the first page is used.

    - #### createFullSizeFromDocument

          @Guarded
          public static PageRegion createFullSizeFromDocument(java.io.File file)

      This method creates a clipping area instance for a full page of the given document. The format from the first page is used.

    - #### createFullSizeFromDocument

          @Guarded
          public static PageRegion createFullSizeFromDocument(java.io.InputStream pdfAsStream)

      This method creates a clipping area instance for a full page of the given document. The format from the first page is used.

    - #### createFullSizeFromDocument

          @Guarded
          public static PageRegion createFullSizeFromDocument(java.net.URL url)

      This method creates a clipping area instance for a full page of the given document. The format from the first page is used.

    - #### createFullSizeFromDocument

          @Guarded
          public static PageRegion createFullSizeFromDocument(byte[] document)

      This method creates a clipping area instance for a full page of the given document. The format from the first page is used.

    - #### getHeightInPoints

          public int getHeightInPoints()

    - #### getName

          public java.lang.String getName()

    - #### getLeftXInPoints

          public int getLeftXInPoints()

    - #### getRectangleLowerLeftBasedPoints

          public java.awt.geom.Rectangle2D getRectangleLowerLeftBasedPoints()

    - #### getRectangleUpperLeftBasedPoints

          public java.awt.geom.Rectangle2D getRectangleUpperLeftBasedPoints()

    - #### getUpperYInPoints

          public int getUpperYInPoints()

    - #### getWidthInPoints

          public int getWidthInPoints()

    - #### setName

          public void setName(java.lang.String name)

    - #### setPageHeightInPoints

          @Guarded
          public void setPageHeightInPoints(int heightInPoints)

    - #### toString

          @IgnoreCoverage
          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright (C) PDFUnit.com. See here for license.