public class PreflightContext extends Object implements Closeable
Constructor and Description |
---|
PreflightContext()
Create the DocumentHandler using the DataSource which represent the PDF file to check.
|
PreflightContext(PreflightConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addFontContainer(org.apache.pdfbox.cos.COSBase cBase,
FontContainer<?> fc)
Add a FontContainer to allow TextObject validation.
|
void |
addToProcessedSet(org.apache.pdfbox.pdmodel.common.COSObjectable cos)
Add the argument to the set of processed elements,
|
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() |
long |
getFileLen() |
FontContainer<?> |
getFontContainer(org.apache.pdfbox.cos.COSBase cBase)
Return the FontContainer identified by the COSBase.
|
ICCProfileWrapper |
getIccProfileWrapper() |
org.apache.xmpbox.XMPMetadata |
getMetadata() |
PreflightPath |
getValidationPath() |
org.apache.pdfbox.pdfparser.XrefTrailerResolver |
getXrefTrailerResolver() |
boolean |
isIccProfileAlreadySearched() |
boolean |
isInProcessedSet(org.apache.pdfbox.pdmodel.common.COSObjectable cos)
Tell if the argument is in the set of processed elements.
|
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 |
setFileLen(long fileLen) |
void |
setIccProfileAlreadySearched(boolean iccProfileAlreadySearched) |
void |
setIccProfileWrapper(ICCProfileWrapper iccProfileWrapper) |
void |
setMetadata(org.apache.xmpbox.XMPMetadata metadata) |
void |
setValidationPath(PreflightPath validationPath) |
void |
setXrefTrailerResolver(org.apache.pdfbox.pdfparser.XrefTrailerResolver xrefTrailerResolver) |
public PreflightContext()
public PreflightContext(PreflightConfiguration configuration)
public org.apache.xmpbox.XMPMetadata getMetadata()
public void setMetadata(org.apache.xmpbox.XMPMetadata metadata)
metadata
- the metadata to setpublic PreflightDocument getDocument()
public org.apache.pdfbox.pdfparser.XrefTrailerResolver getXrefTrailerResolver()
public void setXrefTrailerResolver(org.apache.pdfbox.pdfparser.XrefTrailerResolver xrefTrailerResolver)
public void setDocument(PreflightDocument document)
document
- public void addFontContainer(org.apache.pdfbox.cos.COSBase cBase, FontContainer<?> fc)
cBase
- the COSBase for the font container.fc
- the font container.public FontContainer<?> getFontContainer(org.apache.pdfbox.cos.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()
public void setFileLen(long fileLen)
public long getFileLen()
public void addToProcessedSet(org.apache.pdfbox.pdmodel.common.COSObjectable cos)
cos
- public boolean isInProcessedSet(org.apache.pdfbox.pdmodel.common.COSObjectable cos)
cos
- Copyright © 2002–2025 The Apache Software Foundation. All rights reserved.