public class PreflightContext extends Object implements Closeable
Constructor and Description |
---|
PreflightContext(DataSource source)
Create the DocumentHandler using the DataSource which represent the PDF file to check.
|
PreflightContext(DataSource source,
PreflightConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addFontContainer(COSBase cBase,
FontContainer fc)
Add a FontContainer to allow TextObject validation.
|
void |
addValidationError(ValidationResult.ValidationError error)
Add the given error the PreflightDocument
|
void |
addValidationErrors(List<ValidationResult.ValidationError> errors)
Add the given errors the PreflightDocument
|
void |
close()
Close all opened resources
|
PreflightConfiguration |
getConfig() |
Integer |
getCurrentPageNumber()
Returns the current page number or null if none is known.
|
PreflightDocument |
getDocument() |
FontContainer |
getFontContainer(COSBase cBase)
Return the FontContainer identified by the COSBase.
|
ICCProfileWrapper |
getIccProfileWrapper() |
XMPMetadata |
getMetadata() |
DataSource |
getSource() |
PreflightPath |
getValidationPath() |
XrefTrailerResolver |
getXrefTrailerResolver() |
boolean |
isComplete() |
boolean |
isIccProfileAlreadySearched() |
void |
setConfig(PreflightConfiguration config) |
void |
setCurrentPageNumber(Integer currentPageNumber)
Sets or resets the current page number.
|
void |
setDocument(PreflightDocument document)
Initialize the PDFBox object which present the PDF File.
|
void |
setIccProfileAlreadySearched(boolean iccProfileAlreadySearched) |
void |
setIccProfileWrapper(ICCProfileWrapper iccProfileWrapper) |
void |
setMetadata(XMPMetadata metadata) |
void |
setValidationPath(PreflightPath validationPath) |
void |
setXrefTrailerResolver(XrefTrailerResolver xrefTrailerResolver) |
public PreflightContext(DataSource source)
source
- public PreflightContext(DataSource source, PreflightConfiguration configuration)
public XMPMetadata getMetadata()
public void setMetadata(XMPMetadata metadata)
metadata
- the metadata to setpublic PreflightDocument getDocument()
public XrefTrailerResolver getXrefTrailerResolver()
public void setXrefTrailerResolver(XrefTrailerResolver xrefTrailerResolver)
public void setDocument(PreflightDocument document)
document
- public DataSource getSource()
public boolean isComplete()
public void addFontContainer(COSBase cBase, FontContainer fc)
cBase
- the COSBase for the font container.fc
- the font container.public FontContainer getFontContainer(COSBase cBase)
fontContainers
map, the null value is returned.cBase
- the COSBase for the font containerpublic ICCProfileWrapper getIccProfileWrapper()
public void setIccProfileWrapper(ICCProfileWrapper iccProfileWrapper)
iccProfileWrapper
- the iccProfileWrapper to setpublic PreflightConfiguration getConfig()
public void setConfig(PreflightConfiguration config)
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void addValidationError(ValidationResult.ValidationError error)
error
- public void addValidationErrors(List<ValidationResult.ValidationError> errors)
errors
- the list of validation errors.public PreflightPath getValidationPath()
public void setValidationPath(PreflightPath validationPath)
public boolean isIccProfileAlreadySearched()
public void setIccProfileAlreadySearched(boolean iccProfileAlreadySearched)
public void setCurrentPageNumber(Integer currentPageNumber)
currentPageNumber
- zero based page number or null if none is known.public Integer getCurrentPageNumber()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.