public class PreflightDocument extends PDDocument
Modifier and Type | Field and Description |
---|---|
private PreflightConfiguration |
config |
private PreflightContext |
context |
private ValidationResult |
result |
private Format |
specification |
Constructor and Description |
---|
PreflightDocument(COSDocument doc,
Format format)
Create a preflight document based on the COSDocument and load the default configuration for the given format.
|
PreflightDocument(COSDocument doc,
Format format,
PreflightConfiguration config)
Create a preflight document based on the COSDocument that will use the given configuration bean to process the
validation.
|
PreflightDocument(Format format)
Create an empty preflight document and load the default configuration for the given format.
|
PreflightDocument(Format format,
PreflightConfiguration cfg)
Create an empty preflight document that will use the given configuration bean to process the validation.
|
Modifier and Type | Method and Description |
---|---|
void |
addValidationError(ValidationResult.ValidationError error) |
PreflightContext |
getContext() |
ValidationResult |
getResult() |
Format |
getSpecification() |
private void |
initConfiguration(Format format) |
void |
setContext(PreflightContext context) |
void |
setResult(ValidationResult result) |
void |
validate()
Check that PDDocument is a valid file according to the format given during the object creation.
|
addPage, addSignature, addSignature, addSignature, addSignature, addSignatureField, close, getCurrentAccessPermission, getDocument, getDocumentCatalog, getDocumentId, getDocumentInformation, getEncryption, getLastSignatureDictionary, getNumberOfPages, getPage, getPages, getResourceCache, getSignatureDictionaries, getSignatureFields, getVersion, importPage, isAllSecurityToBeRemoved, isEncrypted, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, load, protect, registerTrueTypeFontForClosing, removePage, removePage, save, save, save, saveIncremental, saveIncrementalForExternalSigning, setAllSecurityToBeRemoved, setDocumentId, setDocumentInformation, setEncryptionDictionary, setResourceCache, setVersion
private ValidationResult result
private PreflightConfiguration config
private PreflightContext context
private final Format specification
public PreflightDocument(Format format) throws java.io.IOException
format
- java.io.IOException
public PreflightDocument(COSDocument doc, Format format)
doc
- format
- public PreflightDocument(Format format, PreflightConfiguration cfg) throws java.io.IOException
format
- cfg
- java.io.IOException
public PreflightDocument(COSDocument doc, Format format, PreflightConfiguration config)
doc
- format
- config
- private void initConfiguration(Format format)
public ValidationResult getResult()
public void setResult(ValidationResult result)
public void addValidationError(ValidationResult.ValidationError error)
public PreflightContext getContext()
public void setContext(PreflightContext context)
public void validate() throws ValidationException
ValidationException
public Format getSpecification()