Package com.itextpdf.text.pdf
Class PdfAStamperImp
java.lang.Object
com.itextpdf.text.DocWriter
com.itextpdf.text.pdf.PdfWriter
com.itextpdf.text.pdf.PdfAStamperImp
- All Implemented Interfaces:
com.itextpdf.text.DocListener,com.itextpdf.text.ElementListener,com.itextpdf.text.pdf.interfaces.PdfAnnotations,com.itextpdf.text.pdf.interfaces.PdfDocumentActions,com.itextpdf.text.pdf.interfaces.PdfEncryptionSettings,com.itextpdf.text.pdf.interfaces.PdfPageActions,com.itextpdf.text.pdf.interfaces.PdfRunDirection,com.itextpdf.text.pdf.interfaces.PdfVersion,com.itextpdf.text.pdf.interfaces.PdfViewerPreferences,EventListener
public class PdfAStamperImp
extends com.itextpdf.text.pdf.PdfWriter
Extension to PdfStamperImp that will attempt to keep a file
in conformance with the PDF/A standard.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.itextpdf.text.pdf.PdfWriter
com.itextpdf.text.pdf.PdfWriter.PdfBody, com.itextpdf.text.pdf.PdfWriter.PdfTrailer -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.itextpdf.text.pdf.AcroFieldsprotected booleanprotected booleanprotected com.itextpdf.text.log.Counterprotected booleanprotected HashSet<com.itextpdf.text.pdf.PdfTemplate>protected com.itextpdf.text.pdf.RandomAccessFileOrArrayprotected booleanprotected booleanprotected booleanprotected intprotected com.itextpdf.text.pdf.IntHashtableprotected int[]protected com.itextpdf.text.pdf.PdfActionprotected intprotected booleanprotected com.itextpdf.text.pdf.internal.PdfViewerPreferencesImpFields inherited from class com.itextpdf.text.pdf.PdfWriter
ALLOW_ASSEMBLY, ALLOW_COPY, ALLOW_DEGRADED_PRINTING, ALLOW_FILL_IN, ALLOW_MODIFY_ANNOTATIONS, ALLOW_MODIFY_CONTENTS, ALLOW_PRINTING, ALLOW_SCREENREADERS, AllowAssembly, AllowCopy, AllowDegradedPrinting, AllowFillIn, AllowModifyAnnotations, AllowModifyContents, AllowPrinting, AllowScreenReaders, body, CenterWindow, colorNumber, colorProfile, compressionLevel, crypto, currentPageNumber, currentPdfReaderInstance, defaultColorspace, DID_PRINT, DID_SAVE, directContent, directContentUnder, DirectionL2R, DirectionR2L, DisplayDocTitle, DO_NOT_ENCRYPT_METADATA, DOCUMENT_CLOSE, documentColors, documentExtGState, documentFonts, documentOCG, documentOCGorder, documentPatterns, documentProperties, documentShadingPatterns, documentShadings, documentSpotPatterns, EMBEDDED_FILES_ONLY, ENCRYPTION_AES_128, ENCRYPTION_AES_256, extraCatalog, FitWindow, fontNumber, formXObjects, formXObjectsCounter, fullCompression, GENERATION_MAX, group, HideMenubar, HideToolbar, HideWindowUI, imageDictionary, JBIG2Globals, markAll, markInlineElementsOnly, newBookmarks, NO_SPACE_CHAR_RATIO, NonFullScreenPageModeUseNone, NonFullScreenPageModeUseOC, NonFullScreenPageModeUseOutlines, NonFullScreenPageModeUseThumbs, OCGLocked, OCGRadioGroup, OCProperties, originalFileID, PAGE_CLOSE, PAGE_OPEN, pageDictEntries, PageLayoutOneColumn, PageLayoutSinglePage, PageLayoutTwoColumnLeft, PageLayoutTwoColumnRight, PageLayoutTwoPageLeft, PageLayoutTwoPageRight, PageModeFullScreen, PageModeUseAttachments, PageModeUseNone, PageModeUseOC, PageModeUseOutlines, PageModeUseThumbs, pageReferences, patternColorspaceCMYK, patternColorspaceGRAY, patternColorspaceRGB, patternNumber, pdf, pdf_version, PDF_VERSION_1_2, PDF_VERSION_1_3, PDF_VERSION_1_4, PDF_VERSION_1_5, PDF_VERSION_1_6, PDF_VERSION_1_7, pdfIsoConformance, PDFX1A2001, PDFX32002, PDFXNONE, prevxref, PrintScalingNone, readerInstances, root, RUN_DIRECTION_DEFAULT, RUN_DIRECTION_LTR, RUN_DIRECTION_NO_BIDI, RUN_DIRECTION_RTL, runDirection, SIGNATURE_APPEND_ONLY, SIGNATURE_EXISTS, SPACE_CHAR_RATIO_DEFAULT, STANDARD_ENCRYPTION_128, STANDARD_ENCRYPTION_40, STRENGTH128BITS, STRENGTH40BITS, structureTreeRoot, tabs, tagged, taggingMode, ttfUnicodeWriter, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, WILL_PRINT, WILL_SAVE, xmpMetadata, xmpWriterFields inherited from class com.itextpdf.text.DocWriter
closeStream, document, EQUALS, FORWARD, GT, LT, NEWLINE, open, os, pageSize, pause, QUOTE, SPACE, TAB -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(com.itextpdf.text.pdf.PdfAnnotation arg0) voidaddComments(com.itextpdf.text.pdf.FdfReader arg0) protected voidprotected voidvoidaddViewerPreference(com.itextpdf.text.pdf.PdfName arg0, com.itextpdf.text.pdf.PdfObject arg1) protected voidprotected voidcacheObject(com.itextpdf.text.pdf.PdfIndirectObject iobj) protected voidclose(com.itextpdf.text.pdf.PdfIndirectReference arg0, int arg1) protected voidcom.itextpdf.text.pdf.PdfAnnotationcreateAnnotation(float llx, float lly, float urx, float ury, com.itextpdf.text.pdf.PdfAction action, com.itextpdf.text.pdf.PdfName subtype) com.itextpdf.text.pdf.PdfAnnotationcreateAnnotation(float llx, float lly, float urx, float ury, com.itextpdf.text.pdf.PdfString title, com.itextpdf.text.pdf.PdfString content, com.itextpdf.text.pdf.PdfName subtype) com.itextpdf.text.pdf.PdfAnnotationcreateAnnotation(com.itextpdf.text.Rectangle rect, com.itextpdf.text.pdf.PdfName subtype) voidprotected com.itextpdf.text.xml.xmp.XmpWritercreateXmpWriter(ByteArrayOutputStream baos, com.itextpdf.text.pdf.PdfDictionary info) protected com.itextpdf.text.xml.xmp.XmpWritercreateXmpWriter(ByteArrayOutputStream baos, HashMap<String, String> info) protected voidprotected voidprotected voidprotected com.itextpdf.text.log.Countercom.itextpdf.text.pdf.PdfContentBytecom.itextpdf.text.pdf.PdfContentByteprotected intgetNewObjectNumber(com.itextpdf.text.pdf.PdfReader arg0, int arg1, int arg2) com.itextpdf.text.pdf.PdfIndirectReferencegetPageReference(int arg0) com.itextpdf.text.pdf.PdfReaderprotected com.itextpdf.text.pdf.TtfUnicodeWriterprotected com.itextpdf.text.pdf.interfaces.PdfIsoConformanceprotected voidmarkUsed(int arg0) protected voidmarkUsed(com.itextpdf.text.pdf.PdfObject arg0) protected voidprotected voidvoidregisterReader(com.itextpdf.text.pdf.PdfReader arg0, boolean arg1) voidsetAdditionalAction(com.itextpdf.text.pdf.PdfName arg0, com.itextpdf.text.pdf.PdfAction arg1) voidsetDuration(int arg0) voidsetFlatAnnotations(boolean arg0) protected voidvoidsetOpenAction(com.itextpdf.text.pdf.PdfAction arg0) voidsetOpenAction(String arg0) protected voidvoidsetOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, com.itextpdf.text.pdf.ICC_Profile colorProfile) voidsetPageAction(com.itextpdf.text.pdf.PdfName arg0, com.itextpdf.text.pdf.PdfAction arg1) voidsetPDFXConformance(int pdfx) Always throws an exception since PDF/X conformance level cannot be set for PDF/A conformant documents.voidsetSigFlags(int arg0) voidsetThumbnail(com.itextpdf.text.Image arg0) voidsetTransition(com.itextpdf.text.pdf.PdfTransition arg0) protected voidvoidsetViewerPreferences(int arg0) voidunRegisterReader(com.itextpdf.text.pdf.PdfReader arg0) protected voidMethods inherited from class com.itextpdf.text.pdf.PdfWriter
add, addCalculationOrder, addDeveloperExtension, addDirectImageSimple, addDirectImageSimple, addFileAttachment, addFileAttachment, addFileAttachment, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addNamedDestination, addNamedDestinations, addOCGRadioGroup, addPageDictEntry, addSharedObjectsToBody, addToBody, addToBody, addToBody, addToBody, addToBody, addToBody, addXFormsToBody, buildStructTreeRootForTagged, checkElementRole, checkPdfIsoConformance, checkPdfIsoConformance, clearTextWrap, close, fillOCProperties, flushAcroFields, flushTaggedObjects, freeReader, getAcroForm, getBoxSize, getBoxSize, getCatalog, getColorProfile, getCompressionLevel, getCurrentDocumentSize, getCurrentPageNumber, getDefaultColorspace, getExtraCatalog, getGroup, getImportedPage, getIndirectReferenceNumber, getInfo, getInstance, getInstance, getNameString, getOCProperties, getOs, getPageDictEntries, getPageEvent, getPageNumber, getPageSize, getPdfIndirectReference, getPdfReaderInstance, getPDFXConformance, getReferenceJBIG2Globals, getRootOutline, getRunDirection, getSpaceCharRatio, getStandardStructElems, getStructureTreeRoot, getTabs, getVerticalPosition, getXmpWriter, isFullCompression, isPageEmpty, isPdfIso, isPdfX, isRgbTransparencyBlending, isStrictImageSequence, isTagged, isUserProperties, lockLayer, needToBeMarkedInContent, open, releaseTemplate, reorderPages, resetPageDictEntries, setAtLeastPdfVersion, setBoxSize, setCollection, setCompressionLevel, setCropBoxSize, setDefaultColorspace, setEncryption, setEncryption, setEncryption, setEncryption, setEncryption, setFullCompression, setGroup, setInitialLeading, setLanguage, setLinearPageMode, setOutlines, setOutputIntents, setOutputIntents, setPageEmpty, setPageEvent, setPageLabels, setPageViewport, setPageXmpMetadata, setPdfVersion, setPdfVersion, setRgbTransparencyBlending, setRunDirection, setSpaceCharRatio, setStrictImageSequence, setTabs, setTagged, setTagged, setUserProperties, setUserunit, setXmpMetadata, useExternalCacheForTagStructure, writeKeyInfo, writeOutlinesMethods inherited from class com.itextpdf.text.DocWriter
add, addTabs, flush, getISOBytes, isCloseStream, isPaused, newPage, pause, resetPageCount, resume, setCloseStream, setMarginMirroring, setMarginMirroringTopBottom, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStart
-
Field Details
-
COUNTER
protected com.itextpdf.text.log.Counter COUNTER -
file
protected com.itextpdf.text.pdf.RandomAccessFileOrArray file -
closed
protected boolean closed -
acroFields
protected com.itextpdf.text.pdf.AcroFields acroFields -
flat
protected boolean flat -
flatFreeText
protected boolean flatFreeText -
flatannotations
protected boolean flatannotations -
namePtr
protected int[] namePtr -
partialFlattening
-
useVp
protected boolean useVp -
viewerPreferences
protected com.itextpdf.text.pdf.internal.PdfViewerPreferencesImp viewerPreferences -
fieldTemplates
-
fieldsAdded
protected boolean fieldsAdded -
sigFlags
protected int sigFlags -
append
protected boolean append -
marked
protected com.itextpdf.text.pdf.IntHashtable marked -
initialXrefSize
protected int initialXrefSize -
openAction
protected com.itextpdf.text.pdf.PdfAction openAction -
namedDestinations
-
-
Method Details
-
readColorProfile
protected void readColorProfile() -
setOutputIntents
public void setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, com.itextpdf.text.pdf.ICC_Profile colorProfile) throws IOException - Overrides:
setOutputIntentsin classcom.itextpdf.text.pdf.PdfWriter- Throws:
IOException- See Also:
-
PdfWriter.setOutputIntents(String, String, String, String, ICC_Profile)
-
setPDFXConformance
public void setPDFXConformance(int pdfx) Always throws an exception since PDF/X conformance level cannot be set for PDF/A conformant documents.- Overrides:
setPDFXConformancein classcom.itextpdf.text.pdf.PdfWriter- Parameters:
pdfx-
-
getTtfUnicodeWriter
protected com.itextpdf.text.pdf.TtfUnicodeWriter getTtfUnicodeWriter()- Overrides:
getTtfUnicodeWriterin classcom.itextpdf.text.pdf.PdfWriter- See Also:
-
PdfWriter.getTtfUnicodeWriter()
-
createXmpWriter
protected com.itextpdf.text.xml.xmp.XmpWriter createXmpWriter(ByteArrayOutputStream baos, com.itextpdf.text.pdf.PdfDictionary info) throws IOException - Overrides:
createXmpWriterin classcom.itextpdf.text.pdf.PdfWriter- Throws:
IOException- See Also:
-
PdfWriter.createXmpWriter(java.io.ByteArrayOutputStream, com.itextpdf.text.pdf.PdfDictionary)
-
createXmpWriter
protected com.itextpdf.text.xml.xmp.XmpWriter createXmpWriter(ByteArrayOutputStream baos, HashMap<String, String> info) throws IOException- Overrides:
createXmpWriterin classcom.itextpdf.text.pdf.PdfWriter- Throws:
IOException
-
initPdfIsoConformance
protected com.itextpdf.text.pdf.interfaces.PdfIsoConformance initPdfIsoConformance()- Overrides:
initPdfIsoConformancein classcom.itextpdf.text.pdf.PdfWriter- See Also:
-
PdfWriter.initPdfIsoConformance()
-
getCounter
protected com.itextpdf.text.log.Counter getCounter() -
cacheObject
protected void cacheObject(com.itextpdf.text.pdf.PdfIndirectObject iobj) - Overrides:
cacheObjectin classcom.itextpdf.text.pdf.PdfWriter
-
close
- Throws:
IOException
-
createAnnotation
public com.itextpdf.text.pdf.PdfAnnotation createAnnotation(com.itextpdf.text.Rectangle rect, com.itextpdf.text.pdf.PdfName subtype) - Overrides:
createAnnotationin classcom.itextpdf.text.pdf.PdfWriter
-
createAnnotation
public com.itextpdf.text.pdf.PdfAnnotation createAnnotation(float llx, float lly, float urx, float ury, com.itextpdf.text.pdf.PdfString title, com.itextpdf.text.pdf.PdfString content, com.itextpdf.text.pdf.PdfName subtype) - Overrides:
createAnnotationin classcom.itextpdf.text.pdf.PdfWriter
-
createAnnotation
public com.itextpdf.text.pdf.PdfAnnotation createAnnotation(float llx, float lly, float urx, float ury, com.itextpdf.text.pdf.PdfAction action, com.itextpdf.text.pdf.PdfName subtype) - Overrides:
createAnnotationin classcom.itextpdf.text.pdf.PdfWriter
-
setViewerPreferences
protected void setViewerPreferences() -
close
- Throws:
IOException
-
alterContents
- Throws:
IOException
-
getNewObjectNumber
protected int getNewObjectNumber(com.itextpdf.text.pdf.PdfReader arg0, int arg1, int arg2) - Overrides:
getNewObjectNumberin classcom.itextpdf.text.pdf.PdfWriter
-
registerReader
- Throws:
IOException
-
unRegisterReader
public void unRegisterReader(com.itextpdf.text.pdf.PdfReader arg0) -
addComments
- Throws:
IOException
-
flatFields
protected void flatFields() -
setFlatAnnotations
public void setFlatAnnotations(boolean arg0) -
flattenAnnotations
protected void flattenAnnotations() -
flatFreeTextFields
protected void flatFreeTextFields() -
getPageReference
public com.itextpdf.text.pdf.PdfIndirectReference getPageReference(int arg0) - Overrides:
getPageReferencein classcom.itextpdf.text.pdf.PdfWriter
-
addAnnotation
public void addAnnotation(com.itextpdf.text.pdf.PdfAnnotation arg0) - Specified by:
addAnnotationin interfacecom.itextpdf.text.pdf.interfaces.PdfAnnotations- Overrides:
addAnnotationin classcom.itextpdf.text.pdf.PdfWriter
-
addFieldResources
- Throws:
IOException
-
setJavaScript
- Throws:
IOException
-
addFileAttachments
- Throws:
IOException
-
setOutlines
- Throws:
IOException
-
setViewerPreferences
public void setViewerPreferences(int arg0) - Specified by:
setViewerPreferencesin interfacecom.itextpdf.text.pdf.interfaces.PdfViewerPreferences- Overrides:
setViewerPreferencesin classcom.itextpdf.text.pdf.PdfWriter
-
addViewerPreference
public void addViewerPreference(com.itextpdf.text.pdf.PdfName arg0, com.itextpdf.text.pdf.PdfObject arg1) - Specified by:
addViewerPreferencein interfacecom.itextpdf.text.pdf.interfaces.PdfViewerPreferences- Overrides:
addViewerPreferencein classcom.itextpdf.text.pdf.PdfWriter
-
setSigFlags
public void setSigFlags(int arg0) - Specified by:
setSigFlagsin interfacecom.itextpdf.text.pdf.interfaces.PdfAnnotations- Overrides:
setSigFlagsin classcom.itextpdf.text.pdf.PdfWriter
-
setPageAction
public void setPageAction(com.itextpdf.text.pdf.PdfName arg0, com.itextpdf.text.pdf.PdfAction arg1) throws com.itextpdf.text.pdf.PdfException - Specified by:
setPageActionin interfacecom.itextpdf.text.pdf.interfaces.PdfPageActions- Overrides:
setPageActionin classcom.itextpdf.text.pdf.PdfWriter- Throws:
com.itextpdf.text.pdf.PdfException
-
setDuration
public void setDuration(int arg0) - Specified by:
setDurationin interfacecom.itextpdf.text.pdf.interfaces.PdfPageActions- Overrides:
setDurationin classcom.itextpdf.text.pdf.PdfWriter
-
setTransition
public void setTransition(com.itextpdf.text.pdf.PdfTransition arg0) - Specified by:
setTransitionin interfacecom.itextpdf.text.pdf.interfaces.PdfPageActions- Overrides:
setTransitionin classcom.itextpdf.text.pdf.PdfWriter
-
markUsed
protected void markUsed(com.itextpdf.text.pdf.PdfObject arg0) -
markUsed
protected void markUsed(int arg0) -
getPdfReader
public com.itextpdf.text.pdf.PdfReader getPdfReader() -
setAdditionalAction
public void setAdditionalAction(com.itextpdf.text.pdf.PdfName arg0, com.itextpdf.text.pdf.PdfAction arg1) throws com.itextpdf.text.pdf.PdfException - Specified by:
setAdditionalActionin interfacecom.itextpdf.text.pdf.interfaces.PdfDocumentActions- Overrides:
setAdditionalActionin classcom.itextpdf.text.pdf.PdfWriter- Throws:
com.itextpdf.text.pdf.PdfException
-
setOpenAction
public void setOpenAction(com.itextpdf.text.pdf.PdfAction arg0) - Specified by:
setOpenActionin interfacecom.itextpdf.text.pdf.interfaces.PdfDocumentActions- Overrides:
setOpenActionin classcom.itextpdf.text.pdf.PdfWriter
-
setOpenAction
- Specified by:
setOpenActionin interfacecom.itextpdf.text.pdf.interfaces.PdfDocumentActions- Overrides:
setOpenActionin classcom.itextpdf.text.pdf.PdfWriter
-
setThumbnail
public void setThumbnail(com.itextpdf.text.Image arg0) - Overrides:
setThumbnailin classcom.itextpdf.text.pdf.PdfWriter
-
getDirectContentUnder
public com.itextpdf.text.pdf.PdfContentByte getDirectContentUnder()- Overrides:
getDirectContentUnderin classcom.itextpdf.text.pdf.PdfWriter
-
getDirectContent
public com.itextpdf.text.pdf.PdfContentByte getDirectContent()- Overrides:
getDirectContentin classcom.itextpdf.text.pdf.PdfWriter
-
readOCProperties
protected void readOCProperties() -
getPdfLayers
-
createXmpMetadata
public void createXmpMetadata()- Overrides:
createXmpMetadatain classcom.itextpdf.text.pdf.PdfWriter
-
getNamedDestinations
-
updateNamedDestinations
- Throws:
IOException
-