Class AcroForm

java.lang.Object
se.swedenconnect.sigval.pdf.pdfstruct.AcroForm

public class AcroForm extends Object
Utility class for an AcroForm used to compare and extract values from the AcroForm
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Summary

    Constructors
    Constructor
    Description
    AcroForm(org.apache.pdfbox.cos.COSBase objectValue, org.apache.pdfbox.cos.COSDocument cosDocument)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the object identifier value referenced by an inner dictionary inside the AcroForm
    boolean
    matches(AcroForm matchForm)
    Math the content with this Acroform with another AcroForm

    Methods inherited from class java.lang.Object

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

    • AcroForm

      public AcroForm(org.apache.pdfbox.cos.COSBase objectValue, org.apache.pdfbox.cos.COSDocument cosDocument)
      Constructor
      Parameters:
      objectValue - the object holding the AcroForm data or reference to AcroForm data
      cosDocument - the COSDocument holding information about the document containing the AcroForm
  • Method Details

    • matches

      public boolean matches(AcroForm matchForm)
      Math the content with this Acroform with another AcroForm
      Parameters:
      matchForm - the AcroForm to match agains
      Returns:
      true on match
    • getObjectRef

      public long getObjectRef(String... path)
      Get the object identifier value referenced by an inner dictionary inside the AcroForm

      Example: if the path "DS" and "Font" is provided, this function looks for a dictionary under key "DS" containing an object under the key "Font"

      Parameters:
      path - the COSName identifying sub dictionaries and finally the key of the target object inside the AcroFrom
      Returns:
      the object identifier value of the target