Class PdfUADocument
java.lang.Object
com.itextpdf.kernel.pdf.PdfDocument
com.itextpdf.pdfua.PdfUADocument
- All Implemented Interfaces:
Closeable, AutoCloseable
Creates a Pdf/UA document.
This class is an extension of PdfDocument and adds the necessary configuration for PDF/UA conformance.
It will add necessary validation to guide the user to create a PDF/UA compliant document.
-
Field Summary
FieldsFields inherited from class PdfDocument
catalog, closed, closeReader, closeWriter, defaultFontStrategy, documentInfoHelper, fingerPrint, flushUnusedObjects, isClosing, pdfConformance, pdfPageFactory, pdfVersion, properties, reader, serializeOptions, structParentIndex, structTreeRoot, tagStructureContext, trailer, writer -
Constructor Summary
ConstructorsConstructorDescriptionPdfUADocument(PdfReader reader, PdfWriter writer, StampingProperties properties, PdfUAConfig config) Creates a PdfUADocument instance.PdfUADocument(PdfReader reader, PdfWriter writer, PdfUAConfig config) Creates a PdfUADocument instance.PdfUADocument(PdfWriter writer, DocumentProperties properties, PdfUAConfig config) Creates a PdfUADocument instance.PdfUADocument(PdfWriter writer, PdfUAConfig config) Creates a PdfUADocument instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate static PdfWriterconfigureWriterProperties(PdfWriter writer, PdfUAConformance uaConformance) private List<IValidationChecker> getCorrectCheckerFromConformance(PdfUAConformance uaConformance) Gets correctPdfUACheckerfor specified PDF/UA conformance.private static PdfUACheckergetUaChecker(List<IValidationChecker> checkers) private voidsetupUAConfiguration(PdfUAConfig config) Methods inherited from class PdfDocument
addAssociatedFile, addEventHandler, addFileAttachment, addFont, addNamedDestination, addNamedDestination, addNewPage, addNewPage, addNewPage, addNewPage, addOutputIntent, addPage, addPage, checkAndAddPage, checkAndAddPage, checkClosingStatus, checkIsoConformance, close, copyPagesTo, copyPagesTo, copyPagesTo, copyPagesTo, copyPagesTo, copyPagesTo, copyPagesTo, copyPagesTo, createNextIndirectReference, dispatchEvent, findFont, flushCopiedObjects, flushFonts, flushObject, getAssociatedFiles, getCatalog, getConformance, getDefaultFont, getDefaultPageSize, getDiContainer, getDocumentFonts, getDocumentId, getDocumentIdWrapper, getDocumentInfo, getEncryptedPayloadDocument, getFingerPrint, getFirstPage, getFont, getLastPage, getMemoryLimitsAwareHandler, getModifiedDocumentId, getNextStructParentIndex, getNumberOfPages, getNumberOfPdfObjects, getOriginalDocumentId, getOutlines, getPage, getPage, getPageFactory, getPageLabels, getPageNumber, getPageNumber, getPdfObject, getPdfVersion, getReader, getSerializeOptions, getStructTreeRoot, getTagStructureContext, getTrailer, getWriter, getXmpMetadata, getXmpMetadata, getXmpMetadataBytes, getXmpMetadataBytes, hasEventHandler, hasOutlines, initializeOutlines, initTagStructureContext, isAppendMode, isClosed, isCloseReader, isCloseWriter, isClosing, isFlushUnusedObjects, isTagged, listIndirectReferences, markStreamAsEmbeddedFile, movePage, movePage, open, registerProduct, removeAllHandlers, removeEventHandler, removePage, removePage, setCloseReader, setCloseWriter, setDefaultPageSize, setEncryptedPayload, setFlushUnusedObjects, setSerializeOptions, setTagged, setUserProperties, setXmpMetadata, setXmpMetadata, setXmpMetadata, storeDestinationToReaddress, tryInitTagStructure, updateDefaultXmpMetadata, updateXmpMetadata
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
PdfUADocument
Creates a PdfUADocument instance.- Parameters:
writer- The writer to write the PDF document.config- The configuration for the PDF/UA document.
-
PdfUADocument
Creates a PdfUADocument instance.- Parameters:
writer- The writer to write the PDF document.properties- The properties for the PDF document.config- The configuration for the PDF/UA document.
-
PdfUADocument
Creates a PdfUADocument instance.- Parameters:
reader- The reader to read the PDF document.writer- The writer to write the PDF document.config- The configuration for the PDF/UA document.
-
PdfUADocument
public PdfUADocument(PdfReader reader, PdfWriter writer, StampingProperties properties, PdfUAConfig config) Creates a PdfUADocument instance.- Parameters:
reader- The reader to read the PDF document.writer- The writer to write the PDF document.properties- The properties for the PDF document.config- The configuration for the PDF/UA document.
-
-
Method Details
-
configureWriterProperties
private static PdfWriter configureWriterProperties(PdfWriter writer, PdfUAConformance uaConformance) -
getUaChecker
-
setupUAConfiguration
-
getCorrectCheckerFromConformance
Gets correctPdfUACheckerfor specified PDF/UA conformance.- Parameters:
uaConformance- the conformance for which checker is needed- Returns:
- the correct PDF/UA checker
-