Class PageContentRotationHelper

java.lang.Object
com.itextpdf.kernel.pdf.PageContentRotationHelper

public final class PageContentRotationHelper extends Object
Helper class to specify or check whether inverse matrix is already applied to the page content stream in case page rotation is applied and PdfPage.setIgnorePageRotationForContent(boolean) is set to true.

Page rotation inverse matrix rotates content into the opposite direction from page rotation direction in order to give the impression of the not rotated text. It should be applied only once for the page.

  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks if page rotation inverse matrix (which rotates content into the opposite direction from the page rotation direction in order to give the impression of the not rotated text) is already applied to the page content stream.
    static void
    Specify that inverse matrix (which rotates content into the opposite direction from the page rotation direction in order to give the impression of the not rotated text) is applied to the page content stream.

    Methods inherited from class java.lang.Object

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

    • isPageRotationInverseMatrixWritten

      public static boolean isPageRotationInverseMatrixWritten (PdfPage page)
      Checks if page rotation inverse matrix (which rotates content into the opposite direction from the page rotation direction in order to give the impression of the not rotated text) is already applied to the page content stream. See PdfPage.setIgnorePageRotationForContent(boolean).
      Parameters:
      page - PdfPage to check applied content rotation for
      Returns:
      true if inverse matrix is already applied, false otherwise
    • setPageRotationInverseMatrixWritten

      public static void setPageRotationInverseMatrixWritten (PdfPage page)
      Specify that inverse matrix (which rotates content into the opposite direction from the page rotation direction in order to give the impression of the not rotated text) is applied to the page content stream. See PdfPage.setIgnorePageRotationForContent(boolean).
      Parameters:
      page - PdfPage for which to specify that content rotation is applied