Record Class FixedDocument.PdfBackground

java.lang.Object
java.lang.Record
io.leandev.appfuse.pdf.FixedDocument.PdfBackground
All Implemented Interfaces:
FixedDocument.Element
Enclosing class:
FixedDocument

public static record FixedDocument.PdfBackground(String id, byte[] bytes, int pageNumber) extends Record implements FixedDocument.Element
PDF 頁面外觀底稿,固定為 STATIC 層。頁碼從 1 起,不匯入註解、AcroForm 或動作。 來源頁面須無旋轉、CropBox 原點為 0、UserUnit 為 1,尺寸與目標頁相同;不自動縮放。
Since:
4.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    PdfBackground(String id, byte[] bytes, int pageNumber)
    Creates an instance of a PdfBackground record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Returns the value of the bytes record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    id()
    Returns the value of the id record component.
     
    int
    Returns the value of the pageNumber record component.
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PdfBackground

      public PdfBackground(String id, byte[] bytes, int pageNumber)
      Creates an instance of a PdfBackground record class.
      Parameters:
      id - the value for the id record component
      bytes - the value for the bytes record component
      pageNumber - the value for the pageNumber record component
  • Method Details

    • layer

      public FixedDocument.Layer layer()
      Specified by:
      layer in interface FixedDocument.Element
    • bytes

      public byte[] bytes()
      Returns the value of the bytes record component.
      Returns:
      the value of the bytes record component
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Specified by:
      id in interface FixedDocument.Element
      Returns:
      the value of the id record component
    • pageNumber

      public int pageNumber()
      Returns the value of the pageNumber record component.
      Returns:
      the value of the pageNumber record component