org.apache.pdfbox.preflight.xobject

## Class XObjFormValidator

- java.lang.Object
- - org.apache.pdfbox.preflight.xobject.AbstractXObjValidator
  - - org.apache.pdfbox.preflight.xobject.XObjFormValidator

All Implemented Interfaces:
  XObjectValidator

    public class XObjFormValidator
    extends AbstractXObjValidator

This class validates XObject with the Form subtype.

### Field Summary

### Fields inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator

`context, cosDocument, xobject`

### Constructor Summary

Constructors
Constructor and Description
`XObjFormValidator(PreflightContext context, org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject xobj)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `checkGroup()` A Form XObject may contain a Group object (Key =" Group").
`protected void` `checkMandatoryFields()` This method checks if required fields are present.
`protected void` `checkPS()` Check if there are no PS entry in the Form XObject dictionary
`protected void` `checkSubtype2Value()` Check the SUbtype2 entry according to the §6.2.5 of the ISO 190005-1:2005 specification.
`void` `validate()` Process the validation of the XObject.
`protected void` `validateXObjectContent()` An Form XObject is a ContentStream.
`protected void` `validateXObjectResources()`

### Methods inherited from class org.apache.pdfbox.preflight.xobject.AbstractXObjValidator

`checkOPI, checkPostscriptXObject, checkReferenceXObject, checkSMask`

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

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

### Constructor Detail

#### XObjFormValidator

    public XObjFormValidator(PreflightContext context,
                             org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject xobj)

### Method Detail

#### validate

    public void validate()
                  throws ValidationException

Description copied from interface: `XObjectValidator`
Process the validation of the XObject.

Specified by:
  `validate` in interface `XObjectValidator`
Overrides:
  `validate` in class `AbstractXObjValidator`
Throws:
  `ValidationException`

#### checkMandatoryFields

    protected void checkMandatoryFields()

Description copied from class: `AbstractXObjValidator`
This method checks if required fields are present.

Specified by:
  `checkMandatoryFields` in class `AbstractXObjValidator`

#### validateXObjectContent

    protected void validateXObjectContent()
                                   throws ValidationException

An Form XObject is a ContentStream. This method method uses an instance of ContentStreamWrapper to check the Stream of this Form XObject.

Throws:
  `ValidationException`

#### checkGroup

    protected void checkGroup()

A Form XObject may contain a Group object (Key =" Group"). If a Group object is present, this method checks if the S entry is present and if its value is different from "Transparency".

#### checkPS

    protected void checkPS()

Check if there are no PS entry in the Form XObject dictionary

#### checkSubtype2Value

    protected void checkSubtype2Value()

Check the SUbtype2 entry according to the §6.2.5 of the ISO 190005-1:2005 specification.

#### validateXObjectResources

    protected void validateXObjectResources()
                                     throws ValidationException

Throws:
  `ValidationException`