public class PreflightDocument extends PDDocument
| Modifier and Type | Field and Description |
|---|---|
protected PreflightConfiguration |
config |
protected PreflightContext |
context |
protected ValidationResult |
result |
protected Format |
specification |
UNKNOWN_NUMBER_OF_PAGES| 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 cfg)
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() |
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, addSignatureField, clearWillEncryptWhenSaving, close, decrypt, encrypt, getCurrentAccessPermission, getDocument, getDocumentCatalog, getDocumentId, getDocumentInformation, getEncryptionDictionary, getLastSignatureDictionary, getNumberOfPages, getOwnerPasswordForEncryption, getPageCount, getPageFormat, getPageMap, getPrintable, getSecurityHandler, getSignatureDictionaries, getSignatureDictionary, getSignatureFields, getUserPasswordForEncryption, importPage, isAllSecurityToBeRemoved, isEncrypted, isOwnerPassword, isUserPassword, load, load, load, load, load, load, load, load, load, load, load, load, loadNonSeq, loadNonSeq, loadNonSeq, loadNonSeq, openProtection, print, print, protect, removePage, removePage, save, save, save, saveIncremental, saveIncremental, setAllSecurityToBeRemoved, setDocumentId, setDocumentInformation, setEncryptionDictionary, setSecurityHandler, silentPrint, silentPrint, wasDecryptedWithOwnerPassword, willEncryptWhenSavingprotected ValidationResult result
protected PreflightConfiguration config
protected PreflightContext context
protected final Format specification
public PreflightDocument(Format format) throws IOException
format - IOExceptionpublic PreflightDocument(COSDocument doc, Format format)
doc - format - public PreflightDocument(Format format, PreflightConfiguration cfg) throws IOException
format - cfg - IOExceptionpublic PreflightDocument(COSDocument doc, Format format, PreflightConfiguration cfg)
doc - format - cfg - IOExceptionpublic 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
ValidationExceptionpublic Format getSpecification()
Copyright © 2002–2019 The Apache Software Foundation. All rights reserved.