com.lowagie.text.pdf
Class PdfStamperImp

java.lang.Object
  extended by com.lowagie.text.DocWriter
      extended by com.lowagie.text.pdf.PdfWriter
          extended by com.lowagie.text.pdf.PdfStamperImp
All Implemented Interfaces:
DocListener, ElementListener, EventListener

public class PdfStamperImp
extends PdfWriter


Nested Class Summary
 
Nested classes/interfaces inherited from class com.lowagie.text.pdf.PdfWriter
PdfWriter.PdfBody
 
Field Summary
protected  AcroFields acroFields
           
protected  boolean append
           
protected  PdfIndirectReference egiz_dict_ir
           
protected  PdfName egiz_dict_name
           
protected  boolean fieldsAdded
           
protected  HashMap fieldTemplates
           
protected  boolean flat
           
protected  boolean flatFreeText
           
protected  int initialXrefSize
           
protected  IntHashtable marked
           
protected  boolean namedAsNames
           
protected  int[] namePtr
           
protected  List newBookmarks
           
protected  PdfAction openAction
           
protected  HashSet partialFlattening
           
protected  int sigFlags
           
protected  boolean useVp
           
protected  int vp
           
 
Fields inherited from class com.lowagie.text.pdf.PdfWriter
AllowAssembly, AllowCopy, AllowDegradedPrinting, AllowFillIn, AllowModifyAnnotations, AllowModifyContents, AllowPrinting, AllowScreenReaders, body, CenterWindow, colorNumber, crypto, currentPageNumber, currentPdfReaderInstance, defaultColorspace, DID_PRINT, DID_SAVE, directContent, directContentUnder, DirectionL2R, DirectionR2L, DisplayDocTitle, DOCUMENT_CLOSE, documentColors, documentExtGState, documentFonts, documentOCG, documentOCGorder, documentPatterns, documentProperties, documentShadingPatterns, documentShadings, documentSpotPatterns, FitWindow, fontNumber, formXObjects, formXObjectsCounter, fullCompression, group, HEADER, HideMenubar, HideToolbar, HideWindowUI, imageDictionary, importedPages, NO_SPACE_CHAR_RATIO, NonFullScreenPageModeUseNone, NonFullScreenPageModeUseOC, NonFullScreenPageModeUseOutlines, NonFullScreenPageModeUseThumbs, OCGRadioGroup, OCProperties, PAGE_CLOSE, PAGE_OPEN, PageLayoutOneColumn, PageLayoutSinglePage, PageLayoutTwoColumnLeft, PageLayoutTwoColumnRight, PageLayoutTwoPageLeft, PageLayoutTwoPageRight, PageModeFullScreen, PageModeUseAttachments, PageModeUseNone, PageModeUseOC, PageModeUseOutlines, PageModeUseThumbs, pageReferences, patternColorspaceCMYK, patternColorspaceGRAY, patternColorspaceRGB, patternNumber, pdf, PDFX1A2001, PDFX32002, PDFXNONE, prevxref, PrintScalingNone, root, RUN_DIRECTION_DEFAULT, RUN_DIRECTION_LTR, RUN_DIRECTION_NO_BIDI, RUN_DIRECTION_RTL, runDirection, SIGNATURE_APPEND_ONLY, SIGNATURE_EXISTS, SPACE_CHAR_RATIO_DEFAULT, STRENGTH128BITS, STRENGTH40BITS, structureTreeRoot, tagged, userunit, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, WILL_PRINT, WILL_SAVE, xmpMetadata
 
Fields inherited from class com.lowagie.text.DocWriter
closeStream, document, EQUALS, FORWARD, GT, LT, NEWLINE, open, os, pageSize, pause, QUOTE, SPACE, TAB
 
Method Summary
 void addAnnotation(PdfAnnotation annot)
          Adds a PdfAnnotation or a PdfFormField to the document.
 void addComments(FdfReader fdf)
           
 PdfContentByte getDirectContent()
          Gets the direct content for this document.
 PdfContentByte getDirectContentUnder()
          Gets the direct content under for this document.
protected  int getNewObjectNumber(PdfReader reader, int number, int generation)
           
 PdfIndirectReference getPageReference(int page)
          Gets a reference to a page existing or not.
protected  void markUsed(int num)
           
 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)
          Sets the 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
add, addCalculationOrder, addDirectImageSimple, addDirectImageSimple, addFileAttachment, addFileAttachment, addJavaScript, addJavaScript, addJavaScript, addOCGRadioGroup, addSharedObjectsToBody, addToBody, addToBody, addToBody, addToBody, addToBody, addToBody, breakTableIfDoesntFit, close, createXmpMetadata, fitsPage, fitsPage, fitsPage, fitsPage, freeReader, getAcroForm, getBoxSize, getCatalog, getCurrentDocumentSize, getDefaultColorspace, getExtraCatalog, getGroup, getImportedPage, getInfo, getInstance, getInstance, getOCProperties, getOs, getPageEvent, getPageNumber, getPageSize, getPdfIndirectReference, getPdfTable, getPDFXConformance, getRootOutline, getRunDirection, getSpaceCharRatio, getStructureTreeRoot, getTableBottom, getUserunit, getVerticalPosition, isFullCompression, isStrictImageSequence, isTagged, open, releaseTemplate, reorderPages, setBoxSize, setCropBoxSize, setDefaultColorspace, setEncryption, setEncryption, setFullCompression, setGroup, setLinearPageMode, setOutputIntents, setOutputIntents, setPageEmpty, setPageEvent, setPageLabels, setPdfVersion, setPDFXConformance, setRunDirection, setSpaceCharRatio, setStrictImageSequence, setTagged, setUserunit, setXmpMetadata
 
Methods inherited from class com.lowagie.text.DocWriter
add, add, addTabs, clearTextWrap, flush, getISOBytes, hasMarkupAttributes, isCloseStream, newPage, pause, removeWatermark, resetFooter, resetHeader, resetPageCount, resume, setCloseStream, setFooter, setHeader, setMarginMirroring, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

acroFields

protected AcroFields acroFields

flat

protected boolean flat

flatFreeText

protected boolean flatFreeText

namePtr

protected int[] namePtr

namedAsNames

protected boolean namedAsNames

newBookmarks

protected List newBookmarks

partialFlattening

protected HashSet partialFlattening

useVp

protected boolean useVp

vp

protected int vp

fieldTemplates

protected HashMap fieldTemplates

fieldsAdded

protected boolean fieldsAdded

sigFlags

protected int sigFlags

append

protected boolean append

marked

protected IntHashtable marked

initialXrefSize

protected int initialXrefSize

openAction

protected PdfAction openAction

egiz_dict_name

protected PdfName egiz_dict_name

egiz_dict_ir

protected PdfIndirectReference egiz_dict_ir
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.

getNewObjectNumber

protected int getNewObjectNumber(PdfReader reader,
                                 int number,
                                 int generation)
Overrides:
getNewObjectNumber in class PdfWriter

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
Gets 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 class: PdfWriter
Adds a PdfAnnotation or a PdfFormField to the document. Only the top parent of a PdfFormField needs to be added.

Overrides:
addAnnotation in class PdfWriter
Parameters:
annot - the PdfAnnotation or the PdfFormField to add
See Also:
PdfWriter.addAnnotation(com.lowagie.text.pdf.PdfAnnotation)

setViewerPreferences

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

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

setSigFlags

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

Overrides:
setSigFlags in class PdfWriter
Parameters:
f - the flags. This flags are ORed with current ones

setPageAction

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

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.

Overrides:
setDuration in class PdfWriter
Parameters:
seconds - ignore

setTransition

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

Overrides:
setTransition in class PdfWriter
Parameters:
transition - ignore

markUsed

public void markUsed(PdfObject obj)

markUsed

protected void markUsed(int num)

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.

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

setOpenAction

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

Overrides:
setOpenAction in class PdfWriter
Parameters:
action - the action to be invoked
See Also:
PdfWriter.setOpenAction(com.lowagie.text.pdf.PdfAction)

setOpenAction

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

Overrides:
setOpenAction in class PdfWriter
Parameters:
name - the name of the destination to jump to
See Also:
PdfWriter.setOpenAction(java.lang.String)

setThumbnail

public void setThumbnail(Image image)
Description copied from class: PdfWriter
Sets the 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
Gets the direct content under for this document. There is only one direct content, multiple calls to this method will allways retrieve the same.

Overrides:
getDirectContentUnder in class PdfWriter
Returns:
the direct content

getDirectContent

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

Overrides:
getDirectContent in class PdfWriter
Returns:
the direct content


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.