public class PdfAStamperImp extends PdfWriter
PdfWriter.PdfBody, PdfWriter.PdfTrailer| Modifier and Type | Field and Description | 
|---|---|
protected AcroFields |  
           acroFields  |  
          
protected boolean |  
           append  |  
          
protected boolean |  
           closed  |  
          
protected Counter |  
           COUNTER  |  
          
protected boolean |  
           fieldsAdded  |  
          
protected HashSet<PdfTemplate> |  
           fieldTemplates  |  
          
protected RandomAccessFileOrArray |  
           file  |  
          
protected boolean |  
           flat  |  
          
protected boolean |  
           flatannotations  |  
          
protected boolean |  
           flatFreeText  |  
          
protected int |  
           initialXrefSize  |  
          
protected IntHashtable |  
           marked  |  
          
protected HashMap<Object,PdfObject> |  
           namedDestinations  |  
          
protected int[] |  
           namePtr  |  
          
protected PdfAction |  
           openAction  |  
          
protected HashSet<String> |  
           partialFlattening  |  
          
protected int |  
           sigFlags  |  
          
protected boolean |  
           useVp  |  
          
protected PdfViewerPreferencesImp |  
           viewerPreferences  |  
          
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, xmpWriter| Modifier and Type | Method and Description | 
|---|---|
void |  
           addAnnotation(PdfAnnotation annot) 
            
              Use this methods to add a   PdfAnnotation or a PdfFormField to the document. 
             |  
          
void |  
           addComments(FdfReader fdf)  |  
          
protected void |  
           addFieldResources()  |  
          
protected void |  
           addFileAttachments()  |  
          
void |  
           addViewerPreference(PdfName key, PdfObject value) 
            
              Adds a viewer preference 
               |  
          
protected void |  
           alterContents()  |  
          
protected void |  
           cacheObject(PdfIndirectObject iobj) 
            
              Use this method for caching objects. 
               |  
          
protected void |  
           close(Map<String,String> moreInfo)  |  
          
protected void |  
           close(PdfIndirectReference info, int skipInfo)  |  
          
PdfAnnotation |  
           createAnnotation(float llx, float lly, float urx, float ury, PdfAction action, PdfName subtype) 
            
              A wrapper around PdfAnnotation constructor. 
               |  
          
PdfAnnotation |  
           createAnnotation(float llx, float lly, float urx, float ury, PdfString title, PdfString content, PdfName subtype) 
            
              A wrapper around PdfAnnotation constructor. 
               |  
          
PdfAnnotation |  
           createAnnotation(Rectangle rect, PdfName subtype) 
            
              A wrapper around PdfAnnotation constructor. 
               |  
          
void |  
           createXmpMetadata() 
            
              Use this method to creates XMP Metadata based on the metadata in the PdfDocument. 
               |  
          
protected XmpWriter |  
           createXmpWriter(ByteArrayOutputStream baos, HashMap<String,String> info)  |  
          
protected XmpWriter |  
           createXmpWriter(ByteArrayOutputStream baos, PdfDictionary info)  |  
          
protected void |  
           flatFields()  |  
          
protected void |  
           flatFreeTextFields()  |  
          
protected void |  
           flattenAnnotations() 
            
              If setFlatAnnotations is set to true, iText will flatten all annotations with an appearance stream 
               |  
          
protected Counter |  
           getCounter()  |  
          
PdfContentByte |  
           getDirectContent() 
            
              Use this method to get the direct content for this document. 
               |  
          
PdfContentByte |  
           getDirectContentUnder() 
            
              Use this method to get the direct content under for this document. 
               |  
          
protected HashMap<Object,PdfObject> |  
           getNamedDestinations()  |  
          
protected int |  
           getNewObjectNumber(PdfReader reader, int number, int generation)  |  
          
PdfIndirectReference |  
           getPageReference(int page) 
            
              Use this method to get a reference to a page existing or not. 
               |  
          
Map<String,PdfLayer> |  
           getPdfLayers() 
            
              Gets the PdfLayer objects in an existing document as a Map with the names/titles of the layers as keys. 
               |  
          
PdfReader |  
           getPdfReader()  |  
          
protected TtfUnicodeWriter |  
           getTtfUnicodeWriter()  |  
          
XMPMeta |  
           getXmpMeta()  |  
          
protected PdfIsoConformance |  
           initPdfIsoConformance()  |  
          
protected void |  
           markUsed(int num)  |  
          
protected void |  
           markUsed(PdfObject obj)  |  
          
protected void |  
           readColorProfile()  |  
          
protected void |  
           readOCProperties() 
            
              Reads the OCProperties dictionary from the catalog of the existing document and fills the documentOCG, documentOCGorder and OCGRadioGroup variables in PdfWriter. 
               |  
          
void |  
           registerReader(PdfReader reader, boolean openFile)  |  
          
void |  
           setAdditionalAction(PdfName actionType, PdfAction action) 
            
              Additional-actions defining the actions to be taken in response to various trigger events affecting the document as a whole. 
               |  
          
void |  
           setDuration(int seconds) 
            
              Always throws an   UnsupportedOperationException. 
             |  
          
void |  
           setFlatAnnotations(boolean flatAnnotations) 
            
              If true, annotations with an appearance stream will be flattened. 
               |  
          
protected void |  
           setJavaScript()  |  
          
void |  
           setOpenAction(PdfAction action) 
            
              When the document opens this   action will be invoked. 
             |  
          
void |  
           setOpenAction(String name) 
            
              When the document opens it will jump to the destination with this name. 
               |  
          
protected void |  
           setOutlines()  |  
          
void |  
           setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile) 
            
              Sets the values of the output intent dictionary. 
               |  
          
void |  
           setPageAction(PdfName actionType, PdfAction action) 
            
              Always throws an   UnsupportedOperationException. 
             |  
          
void |  
           setPDFXConformance(int pdfx) 
            
              Always throws an exception since PDF/X conformance level cannot be set for PDF/A conformant documents. 
               |  
          
void |  
           setSigFlags(int f) 
            
              Set the signature flags. 
               |  
          
void |  
           setThumbnail(Image image) 
            
              Use this method to set the thumbnail image for the current page. 
               |  
          
void |  
           setTransition(PdfTransition transition) 
            
              Always throws an   UnsupportedOperationException. 
             |  
          
protected void |  
           setViewerPreferences()  |  
          
void |  
           setViewerPreferences(int preferences) 
            
              Sets the viewer preferences. 
               |  
          
void |  
           unRegisterReader(PdfReader reader)  |  
          
protected void |  
           updateNamedDestinations()  |  
          
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, writeOutlinesadd, addTabs, flush, getISOBytes, isCloseStream, isPaused, newPage, pause, resetPageCount, resume, setCloseStream, setMarginMirroring, setMarginMirroringTopBottom, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStartprotected Counter COUNTER
protected RandomAccessFileOrArray file
protected boolean closed
protected AcroFields acroFields
protected boolean flat
protected boolean flatFreeText
protected boolean flatannotations
protected int[] namePtr
protected boolean useVp
protected PdfViewerPreferencesImp viewerPreferences
protected HashSet<PdfTemplate> fieldTemplates
protected boolean fieldsAdded
protected int sigFlags
protected boolean append
protected IntHashtable marked
protected int initialXrefSize
protected PdfAction openAction
protected void readColorProfile()
public void setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile) throws IOException
PdfWriter 
          setOutputIntents in class PdfWriter 
           outputConditionIdentifier - a value 
           outputCondition - a value 
           registryName - a value 
           info - a value 
           colorProfile - a value 
           IOException - on error 
           PdfWriter.setOutputIntents(String, String, String, String, ICC_Profile) 
           public void setPDFXConformance(int pdfx)
setPDFXConformance in class PdfWriter 
           pdfx - 
           PdfXConformance.setPDFXConformance(int) 
           protected TtfUnicodeWriter getTtfUnicodeWriter()
getTtfUnicodeWriter in class PdfWriter 
           PdfWriter.getTtfUnicodeWriter() 
           protected XmpWriter createXmpWriter(ByteArrayOutputStream baos, PdfDictionary info) throws IOException
createXmpWriter in class PdfWriter 
           IOException 
           PdfWriter.createXmpWriter(java.io.ByteArrayOutputStream, com.itextpdf.text.pdf.PdfDictionary) 
           protected XmpWriter createXmpWriter(ByteArrayOutputStream baos, HashMap<String,String> info) throws IOException
createXmpWriter in class PdfWriter 
           IOException 
           protected PdfIsoConformance initPdfIsoConformance()
initPdfIsoConformance in class PdfWriter 
           PdfWriter.initPdfIsoConformance() 
           protected Counter getCounter()
protected void cacheObject(PdfIndirectObject iobj)
PdfWriter 
          cacheObject in class PdfWriter 
           iobj - @see PdfIndirectObject 
           protected void close(Map<String,String> moreInfo) throws IOException
IOException 
           public PdfAnnotation createAnnotation(Rectangle rect, PdfName subtype)
PdfWriter 
          createAnnotation in class PdfWriter 
           public PdfAnnotation createAnnotation(float llx, float lly, float urx, float ury, PdfString title, PdfString content, PdfName subtype)
PdfWriter 
          createAnnotation in class PdfWriter 
           public PdfAnnotation createAnnotation(float llx, float lly, float urx, float ury, PdfAction action, PdfName subtype)
PdfWriter 
          createAnnotation in class PdfWriter 
           public XMPMeta getXmpMeta()
protected void setViewerPreferences()
protected void close(PdfIndirectReference info, int skipInfo) throws IOException
IOException 
           protected void alterContents()
                      throws IOException 
          IOException 
           protected int getNewObjectNumber(PdfReader reader, int number, int generation)
getNewObjectNumber in class PdfWriter 
           public void registerReader(PdfReader reader, boolean openFile) throws IOException
reader - 
           openFile - 
           IOException 
           public void unRegisterReader(PdfReader reader)
reader - 
           public void addComments(FdfReader fdf) throws IOException
fdf - 
           IOException 
           protected void flatFields()
public void setFlatAnnotations(boolean flatAnnotations)
flatAnnotations - boolean 
           protected void flattenAnnotations()
protected void flatFreeTextFields()
public PdfIndirectReference getPageReference(int page)
PdfWriter 
          getPageReference in class PdfWriter 
           page - the page number. The first page is 1 
           PdfWriter.getPageReference(int) 
           public void addAnnotation(PdfAnnotation annot)
PdfAnnotations 
          PdfAnnotation or a PdfFormField to the document. Only the top parent of a PdfFormField needs to be added. 
          addAnnotation in interface PdfAnnotations 
           addAnnotation in class PdfWriter 
           annot - the PdfAnnotation or the PdfFormField to add 
           PdfWriter.addAnnotation(com.itextpdf.text.pdf.PdfAnnotation) 
           protected void addFieldResources()
                          throws IOException 
          IOException 
           protected void setJavaScript()
                      throws IOException 
          IOException 
           protected void addFileAttachments()
                           throws IOException 
          IOException 
           protected void setOutlines()
                    throws IOException 
          IOException 
           public void setViewerPreferences(int preferences)
setViewerPreferences in interface PdfViewerPreferences 
           setViewerPreferences in class PdfWriter 
           preferences - the viewer preferences 
           PdfWriter.setViewerPreferences(int) 
           public void addViewerPreference(PdfName key, PdfObject value)
addViewerPreference in interface PdfViewerPreferences 
           addViewerPreference in class PdfWriter 
           key - a key for a viewer preference 
           value - the value for the viewer preference 
           PdfViewerPreferences.addViewerPreference(com.itextpdf.text.pdf.PdfName, com.itextpdf.text.pdf.PdfObject) 
           public void setSigFlags(int f)
setSigFlags in interface PdfAnnotations 
           setSigFlags in class PdfWriter 
           f - the flags. This flags are ORed with current ones 
           PdfAnnotations.setSigFlags(int) 
           public void setPageAction(PdfName actionType, PdfAction action) throws PdfException
UnsupportedOperationException. 
          setPageAction in interface PdfPageActions 
           setPageAction in class PdfWriter 
           actionType - ignore 
           action - ignore 
           PdfException - ignore 
           PdfStamper.setPageAction(PdfName, PdfAction, int) 
           public void setDuration(int seconds)
UnsupportedOperationException. 
          setDuration in interface PdfPageActions 
           setDuration in class PdfWriter 
           seconds - ignore 
           PdfPageActions.setDuration(int) 
           public void setTransition(PdfTransition transition)
UnsupportedOperationException. 
          setTransition in interface PdfPageActions 
           setTransition in class PdfWriter 
           transition - ignore 
           PdfPageActions.setTransition(com.itextpdf.text.pdf.PdfTransition) 
           protected void markUsed(PdfObject obj)
protected void markUsed(int num)
public PdfReader getPdfReader()
public void setAdditionalAction(PdfName actionType, PdfAction action) throws PdfException
DOCUMENT_CLOSE, WILL_SAVE, DID_SAVE, WILL_PRINT and DID_PRINT. 
          setAdditionalAction in interface PdfDocumentActions 
           setAdditionalAction in class PdfWriter 
           actionType - the action type 
           action - the action to execute in response to the trigger 
           PdfException - on invalid action type 
           PdfDocumentActions.setAdditionalAction(com.itextpdf.text.pdf.PdfName, com.itextpdf.text.pdf.PdfAction) 
           public void setOpenAction(PdfAction action)
PdfDocumentActions 
          action will be invoked. 
          setOpenAction in interface PdfDocumentActions 
           setOpenAction in class PdfWriter 
           action - the action to be invoked 
           PdfWriter.setOpenAction(com.itextpdf.text.pdf.PdfAction) 
           public void setOpenAction(String name)
PdfDocumentActions 
          setOpenAction in interface PdfDocumentActions 
           setOpenAction in class PdfWriter 
           name - the name of the destination to jump to 
           PdfWriter.setOpenAction(java.lang.String) 
           public void setThumbnail(Image image)
PdfWriter 
          setThumbnail in class PdfWriter 
           image - the image 
           PdfWriter.setThumbnail(com.itextpdf.text.Image) 
           public PdfContentByte getDirectContentUnder()
PdfWriter 
          getDirectContentUnder in class PdfWriter 
           public PdfContentByte getDirectContent()
PdfWriter 
          getDirectContent in class PdfWriter 
           protected void readOCProperties()
public Map<String,PdfLayer> getPdfLayers()
public void createXmpMetadata()
PdfWriter 
          createXmpMetadata in class PdfWriter 
           protected void updateNamedDestinations()
                                throws IOException 
          IOException 
           Copyright © 1998–2019. All rights reserved.