com.lowagie.text.pdf
Class PdfStamperImp

java.lang.Object
  extended bycom.lowagie.text.DocWriter
      extended bycom.lowagie.text.pdf.PdfWriter
          extended bycom.lowagie.text.pdf.PdfStamperImp
All Implemented Interfaces:
DocListener, ElementListener, EventListener, PdfAnnotations, PdfDocumentActions, PdfEncryptionSettings, PdfPageActions, PdfRunDirection, PdfVersion, PdfViewerPreferences, PdfXConformance

public class PdfStamperImp
extends PdfWriter


Nested Class Summary
 
Nested classes inherited from class com.lowagie.text.pdf.PdfWriter
PdfWriter.PdfBody
 
Field Summary
 
Fields inherited from class com.lowagie.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, CenterWindow, DID_PRINT, DID_SAVE, DirectionL2R, DirectionR2L, DisplayDocTitle, DO_NOT_ENCRYPT_METADATA, DOCUMENT_CLOSE, EMBEDDED_FILES_ONLY, ENCRYPTION_AES_128, FitWindow, HideMenubar, HideToolbar, HideWindowUI, NO_SPACE_CHAR_RATIO, NonFullScreenPageModeUseNone, NonFullScreenPageModeUseOC, NonFullScreenPageModeUseOutlines, NonFullScreenPageModeUseThumbs, PAGE_CLOSE, PAGE_OPEN, PageLayoutOneColumn, PageLayoutSinglePage, PageLayoutTwoColumnLeft, PageLayoutTwoColumnRight, PageLayoutTwoPageLeft, PageLayoutTwoPageRight, PageModeFullScreen, PageModeUseAttachments, PageModeUseNone, PageModeUseOC, PageModeUseOutlines, PageModeUseThumbs, PDF_VERSION_1_2, PDF_VERSION_1_3, PDF_VERSION_1_4, PDF_VERSION_1_5, PDF_VERSION_1_6, PDF_VERSION_1_7, PDFA1A, PDFA1B, PDFX1A2001, PDFX32002, PDFXNONE, PrintScalingNone, RUN_DIRECTION_DEFAULT, RUN_DIRECTION_LTR, RUN_DIRECTION_NO_BIDI, RUN_DIRECTION_RTL, SIGNATURE_APPEND_ONLY, SIGNATURE_EXISTS, SPACE_CHAR_RATIO_DEFAULT, STANDARD_ENCRYPTION_128, STANDARD_ENCRYPTION_40, STRENGTH128BITS, STRENGTH40BITS, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, WILL_PRINT, WILL_SAVE
 
Fields inherited from class com.lowagie.text.DocWriter
EQUALS, FORWARD, GT, LT, NEWLINE, QUOTE, SPACE, TAB
 
Method Summary
 void addAnnotation(PdfAnnotation annot)
          Use this methods to add a PdfAnnotation or a PdfFormField to the document.
 void addComments(FdfReader fdf)
           
 void addViewerPreference(PdfName key, PdfObject value)
          Adds a viewer preference
 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.
 PdfIndirectReference getPageReference(int page)
          Use this method to get a reference to a page existing or not.
 Map getPdfLayers()
          Gets the PdfLayer objects in an existing document as a Map with the names/titles of the layers as keys.
 void markUsed(PdfObject obj)
           
 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 setEgizDictTrailerInfo(PdfName name, PdfIndirectReference ir)
          Sets the key and the contents of the entry to be added to the trailer if an egiz dict is present.
 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.
 void setPageAction(PdfName actionType, PdfAction action)
          Always throws an UnsupportedOperationException.
 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.
 void setViewerPreferences(int preferences)
          Sets the viewer preferences.
 void unRegisterReader(PdfReader reader)
           
 
Methods inherited from class com.lowagie.text.pdf.PdfWriter
addCalculationOrder, addDirectImageSimple, addDirectImageSimple, addFileAttachment, addFileAttachment, addFileAttachment, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addOCGRadioGroup, addToBody, addToBody, addToBody, addToBody, addToBody, addToBody, clearTextWrap, close, createXmpMetadata, fitsPage, fitsPage, freeReader, getAcroForm, getBoxSize, getCompressionLevel, getCurrentDocumentSize, getCurrentPageNumber, getDefaultColorspace, getExtraCatalog, getGroup, getImportedPage, getInfo, getInstance, getInstance, getOCProperties, getPageEvent, getPageNumber, getPageSize, getPdfIndirectReference, getPDFXConformance, getRootOutline, getRunDirection, getSpaceCharRatio, getStructureTreeRoot, getUserunit, getVerticalPosition, isFullCompression, isPdfX, isRgbTransparencyBlending, isStrictImageSequence, isTagged, isUserProperties, lockLayer, open, releaseTemplate, reorderPages, setAtLeastPdfVersion, setBoxSize, setCollection, setCompressionLevel, setCropBoxSize, setDefaultColorspace, setEncryption, setEncryption, setEncryption, setEncryption, setEncryption, setFullCompression, setGroup, setLinearPageMode, setOutlines, setOutputIntents, setOutputIntents, setPageEmpty, setPageEvent, setPageLabels, setPageXmpMetadata, setPdfVersion, setPdfVersion, setPDFXConformance, setRgbTransparencyBlending, setRunDirection, setSpaceCharRatio, setStrictImageSequence, setTagged, setUserProperties, setUserunit, setXmpMetadata
 
Methods inherited from class com.lowagie.text.DocWriter
add, flush, getISOBytes, isCloseStream, isPaused, newPage, pause, resetFooter, resetHeader, resetPageCount, resume, setCloseStream, setFooter, setHeader, setMarginMirroring, setMargins, setPageCount, setPageSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setEgizDictTrailerInfo

public void setEgizDictTrailerInfo(PdfName name,
                                   PdfIndirectReference ir)
Sets the key and the contents of the entry to be added to the trailer if an egiz dict is present.

Parameters:
name - The name of the egiz dict in the trailer.
ir - The indirect reference of the egiz dict.

registerReader

public void registerReader(PdfReader reader,
                           boolean openFile)
                    throws IOException
Parameters:
reader -
openFile -
Throws:
IOException

unRegisterReader

public void unRegisterReader(PdfReader reader)
Parameters:
reader -

addComments

public void addComments(FdfReader fdf)
                 throws IOException
Parameters:
fdf -
Throws:
IOException

getPageReference

public PdfIndirectReference getPageReference(int page)
Description copied from class: PdfWriter
Use this method to get a reference to a page existing or not. If the page does not exist yet the reference will be created in advance. If on closing the document, a page number greater than the total number of pages was requested, an exception is thrown.

Overrides:
getPageReference in class PdfWriter
Parameters:
page - the page number. The first page is 1
Returns:
the reference to the page
See Also:
PdfWriter.getPageReference(int)

addAnnotation

public void addAnnotation(PdfAnnotation annot)
Description copied from interface: PdfAnnotations
Use this methods to add a PdfAnnotation or a PdfFormField to the document. Only the top parent of a PdfFormField needs to be added.

Specified by:
addAnnotation in interface PdfAnnotations
Overrides:
addAnnotation in class PdfWriter
See Also:
PdfWriter.addAnnotation(com.lowagie.text.pdf.PdfAnnotation)

setViewerPreferences

public void setViewerPreferences(int preferences)
Sets the viewer preferences.

Specified by:
setViewerPreferences in interface PdfViewerPreferences
Overrides:
setViewerPreferences in class PdfWriter
Parameters:
preferences - the viewer preferences
See Also:
PdfWriter.setViewerPreferences(int)

addViewerPreference

public void addViewerPreference(PdfName key,
                                PdfObject value)
Adds a viewer preference

Specified by:
addViewerPreference in interface PdfViewerPreferences
Overrides:
addViewerPreference in class PdfWriter
Parameters:
key - a key for a viewer preference
value - the value for the viewer preference
See Also:
PdfViewerPreferences.addViewerPreference(com.lowagie.text.pdf.PdfName, com.lowagie.text.pdf.PdfObject)

setSigFlags

public void setSigFlags(int f)
Set the signature flags.

Specified by:
setSigFlags in interface PdfAnnotations
Overrides:
setSigFlags in class PdfWriter
Parameters:
f - the flags. This flags are ORed with current ones
See Also:
PdfAnnotations.setSigFlags(int)

setPageAction

public void setPageAction(PdfName actionType,
                          PdfAction action)
                   throws PdfException
Always throws an UnsupportedOperationException.

Specified by:
setPageAction in interface PdfPageActions
Overrides:
setPageAction in class PdfWriter
Parameters:
actionType - ignore
action - ignore
Throws:
PdfException - ignore
See Also:
PdfStamper.setPageAction(PdfName, PdfAction, int)

setDuration

public void setDuration(int seconds)
Always throws an UnsupportedOperationException.

Specified by:
setDuration in interface PdfPageActions
Overrides:
setDuration in class PdfWriter
Parameters:
seconds - ignore
See Also:
PdfPageActions.setDuration(int)

setTransition

public void setTransition(PdfTransition transition)
Always throws an UnsupportedOperationException.

Specified by:
setTransition in interface PdfPageActions
Overrides:
setTransition in class PdfWriter
Parameters:
transition - ignore
See Also:
PdfPageActions.setTransition(com.lowagie.text.pdf.PdfTransition)

markUsed

public void markUsed(PdfObject obj)

setAdditionalAction

public void setAdditionalAction(PdfName actionType,
                                PdfAction action)
                         throws PdfException
Additional-actions defining the actions to be taken in response to various trigger events affecting the document as a whole. The actions types allowed are: DOCUMENT_CLOSE, WILL_SAVE, DID_SAVE, WILL_PRINT and DID_PRINT.

Specified by:
setAdditionalAction in interface PdfDocumentActions
Overrides:
setAdditionalAction in class PdfWriter
Parameters:
actionType - the action type
action - the action to execute in response to the trigger
Throws:
PdfException - on invalid action type
See Also:
PdfDocumentActions.setAdditionalAction(com.lowagie.text.pdf.PdfName, com.lowagie.text.pdf.PdfAction)

setOpenAction

public void setOpenAction(PdfAction action)
Description copied from interface: PdfDocumentActions
When the document opens this action will be invoked.

Specified by:
setOpenAction in interface PdfDocumentActions
Overrides:
setOpenAction in class PdfWriter
See Also:
PdfWriter.setOpenAction(com.lowagie.text.pdf.PdfAction)

setOpenAction

public void setOpenAction(String name)
Description copied from interface: PdfDocumentActions
When the document opens it will jump to the destination with this name.

Specified by:
setOpenAction in interface PdfDocumentActions
Overrides:
setOpenAction in class PdfWriter
See Also:
PdfWriter.setOpenAction(java.lang.String)

setThumbnail

public void setThumbnail(Image image)
Description copied from class: PdfWriter
Use this method to set the thumbnail image for the current page.

Overrides:
setThumbnail in class PdfWriter
Parameters:
image - the image
See Also:
PdfWriter.setThumbnail(com.lowagie.text.Image)

getDirectContentUnder

public PdfContentByte getDirectContentUnder()
Description copied from class: PdfWriter
Use this method to get the direct content under for this document. There is only one direct content, multiple calls to this method will always retrieve the same object.

Overrides:
getDirectContentUnder in class PdfWriter
Returns:
the direct content

getDirectContent

public PdfContentByte getDirectContent()
Description copied from class: PdfWriter
Use this method to get the direct content for this document. There is only one direct content, multiple calls to this method will allways retrieve the same object.

Overrides:
getDirectContent in class PdfWriter
Returns:
the direct content

getPdfLayers

public Map getPdfLayers()
Gets the PdfLayer objects in an existing document as a Map with the names/titles of the layers as keys.

Returns:
a Map with all the PdfLayers in the document (and the name/title of the layer as key)
Since:
2.1.2


Copyright © 2011 EGIZ - E-Government Innovation Center. All Rights Reserved.