Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
class: PdfStamperImp [javadoc | source]
java.lang.Object
   com.lowagie.text.DocWriter
      com.lowagie.text.pdf.PdfWriter
         com.lowagie.text.pdf.PdfStamperImp

All Implemented Interfaces:
    DocListener

Nested Class Summary:
static class  PdfStamperImp.PageStamp   
Field Summary
 HashMap readers2intrefs     
 HashMap readers2file     
 RandomAccessFileOrArray file     
 PdfReader reader     
 IntHashtable myXref     
 HashMap pagesToContent    Integer(page number) -> PageStamp 
 boolean closed     
protected  AcroFields acroFields     
protected  boolean flat     
protected  boolean flatFreeText     
protected  int[] namePtr     
protected  HashSet partialFlattening     
protected  boolean useVp     
protected  PdfViewerPreferencesImp viewerPreferences     
protected  HashMap fieldTemplates     
protected  boolean fieldsAdded     
protected  int sigFlags     
protected  boolean append     
protected  IntHashtable marked     
protected  int initialXrefSize     
protected  PdfAction openAction     
Fields inherited from com.lowagie.text.pdf.PdfWriter:
PageLayoutSinglePage,  PageLayoutOneColumn,  PageLayoutTwoColumnLeft,  PageLayoutTwoColumnRight,  PageModeUseNone,  PageModeUseOutlines,  PageModeUseThumbs,  PageModeFullScreen,  PageModeUseOC,  HideToolbar,  HideMenubar,  HideWindowUI,  FitWindow,  CenterWindow,  NonFullScreenPageModeUseNone,  NonFullScreenPageModeUseOutlines,  NonFullScreenPageModeUseThumbs,  NonFullScreenPageModeUseOC,  DirectionL2R,  DirectionR2L,  DisplayDocTitle,  PrintScalingNone,  ViewerPreferencesMask,  AllowPrinting,  AllowModifyContents,  AllowCopy,  AllowModifyAnnotations,  AllowFillIn,  AllowScreenReaders,  AllowAssembly,  AllowDegradedPrinting,  STRENGTH40BITS,  STRENGTH128BITS,  DOCUMENT_CLOSE,  WILL_SAVE,  DID_SAVE,  WILL_PRINT,  DID_PRINT,  PAGE_OPEN,  PAGE_CLOSE,  SIGNATURE_EXISTS,  SIGNATURE_APPEND_ONLY,  VERSION_1_2,  VERSION_1_3,  VERSION_1_4,  VERSION_1_5,  VERSION_1_6,  HEADER,  prevxref,  root,  imageDictionary,  formXObjects,  formXObjectsCounter,  fontNumber,  colorNumber,  patternNumber,  directContent,  directContentUnder,  documentFonts,  documentColors,  documentPatterns,  documentShadings,  documentShadingPatterns,  patternColorspaceRGB,  patternColorspaceGRAY,  patternColorspaceCMYK,  documentSpotPatterns,  documentExtGState,  documentLayers,  documentOCG,  documentOCGorder,  OCProperties,  OCGRadioGroup,  defaultColorspace,  PDFXNONE,  PDFX1A2001,  PDFX32002,  PDFXKEY_COLOR,  PDFXKEY_CMYK,  PDFXKEY_RGB,  PDFXKEY_FONT,  PDFXKEY_IMAGE,  PDFXKEY_GSTATE,  PDFXKEY_LAYER,  body,  pdf,  crypto,  importedPages,  currentPdfReaderInstance,  pageReferences,  currentPageNumber,  group,  SPACE_CHAR_RATIO_DEFAULT,  NO_SPACE_CHAR_RATIO,  RUN_DIRECTION_DEFAULT,  RUN_DIRECTION_NO_BIDI,  RUN_DIRECTION_LTR,  RUN_DIRECTION_RTL,  runDirection,  fullCompression
Fields inherited from com.lowagie.text.DocWriter:
NEWLINE,  TAB,  LT,  SPACE,  EQUALS,  QUOTE,  GT,  FORWARD,  pageSize,  document,  os,  open,  pause,  closeStream
Constructor:
 PdfStamperImp(PdfReader reader,
    OutputStream os,
    char pdfVersion,
    boolean append) throws IOException, DocumentException 
    Creates new PdfStamperImp.
    Parameters:
    reader - the read PDF
    os - the output destination
    pdfVersion - the new pdf version or '\0' to keep the same version as the original document
    append -
    Throws:
    DocumentException - on error
    IOException -
Method from com.lowagie.text.pdf.PdfStamperImp Summary:
addAnnotation,   addAnnotation,   addAnnotation,   addComments,   addDocumentField,   addFieldResources,   addFileAttachments,   addViewerPreference,   alterContents,   alterResources,   applyRotation,   close,   correctAcroFieldPages,   deleteOutlines,   eliminateAcroformObjects,   expandFields,   findAllObjects,   flatFields,   getAcroFields,   getDirectContent,   getDirectContentUnder,   getNewObjectNumber,   getOverContent,   getPageReference,   getPageStamp,   getPdfLayers,   getReaderFile,   getUnderContent,   insertPage,   isAppend,   isContentWritten,   isRotateContents,   makePackage,   markUsed,   markUsed,   partialFormFlattening,   readOCProperties,   registerReader,   replacePage,   setAdditionalAction,   setDuration,   setDuration,   setFormFlattening,   setFreeTextFlattening,   setJavaScript,   setOpenAction,   setOpenAction,   setOutlines,   setPageAction,   setPageAction,   setRotateContents,   setSigFlags,   setThumbnail,   setThumbnail,   setTransition,   setTransition,   setViewerPreferences,   sweepKids,   unRegisterReader
Methods from com.lowagie.text.pdf.PdfWriter:
add,   add,   add,   addAnnotation,   addAnnotation,   addCalculationOrder,   addDirectImageSimple,   addDirectTemplateSimple,   addJavaScript,   addJavaScript,   addJavaScript,   addLocalDestinations,   addOCGRadioGroup,   addSharedObjectsToBody,   addSimple,   addSimple,   addSimpleExtGState,   addSimpleLayer,   addSimplePattern,   addSimplePatternColorspace,   addSimpleShading,   addSimpleShadingPattern,   addToBody,   addToBody,   addToBody,   addToBody,   addToBody,   addToBody,   breakTableIfDoesntFit,   checkPDFXConformance,   close,   eliminateFontSubset,   fitsPage,   fitsPage,   fitsPage,   fitsPage,   freeReader,   getAcroForm,   getCatalog,   getCurrentDocumentSize,   getCurrentPage,   getCurrentPageNumber,   getDefaultColorspace,   getDirectContent,   getDirectContentUnder,   getEncryption,   getExtraCatalog,   getGroup,   getImageReference,   getImportedPage,   getIndirectReferenceNumber,   getInfo,   getInstance,   getInstance,   getNewObjectNumber,   getOCProperties,   getOs,   getPDFXConformance,   getPageEvent,   getPageNumber,   getPageReference,   getPdfDocument,   getPdfIndirectReference,   getPdfTable,   getReaderFile,   getRootOutline,   getRunDirection,   getSpaceCharRatio,   getTableBottom,   getVerticalPosition,   isFullCompression,   isPaused,   isStrictImageSequence,   open,   registerLayer,   reorderPages,   resetContent,   setAdditionalAction,   setBoxSize,   setCropBoxSize,   setDefaultColorspace,   setDuration,   setEncryption,   setEncryption,   setFullCompression,   setGroup,   setLinearPageMode,   setOpenAction,   setOpenAction,   setOutputIntents,   setOutputIntents,   setPDFXConformance,   setPageAction,   setPageEmpty,   setPageEvent,   setPageLabels,   setPdfVersion,   setRunDirection,   setSigFlags,   setSpaceCharRatio,   setStrictImageSequence,   setThumbnail,   setTransition,   setViewerPreferences
Methods from com.lowagie.text.DocWriter:
add,   addTabs,   close,   flush,   getISOBytes,   isCloseStream,   isPaused,   newPage,   open,   pause,   resetFooter,   resetHeader,   resetPageCount,   resume,   setCloseStream,   setFooter,   setHeader,   setMarginMirroring,   setMargins,   setPageCount,   setPageSize,   write,   write,   writeEnd,   writeEnd,   writeMarkupAttributes,   writeStart
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfStamperImp Detail:
 public  void addAnnotation(PdfAnnotation annot) 
  void addAnnotation(PdfAnnotation annot,
    PdfDictionary pageN) 
  void addAnnotation(PdfAnnotation annot,
    int page) 
 public  void addComments(FdfReader fdf) throws IOException 
  void addDocumentField(PdfIndirectReference ref) 
  void addFieldResources() throws IOException 
  void addFileAttachments() throws IOException 
 public  void addViewerPreference(PdfName key,
    PdfObject value) 
    Adds a viewer preference
  void alterContents() throws IOException 
  void alterResources(PdfStamperImp.PageStamp ps) 
  void applyRotation(PdfDictionary pageN,
    ByteBuffer out) 
  void close(HashMap moreInfo) throws IOException 
  void correctAcroFieldPages(int page) 
  void deleteOutlines() 
  void eliminateAcroformObjects() 
  void expandFields(PdfFormField field,
    ArrayList allAnnots) 
 static  void findAllObjects(PdfReader reader,
    PdfObject obj,
    IntHashtable hits) 
  void flatFields() 
 AcroFields getAcroFields() 
 public PdfContentByte getDirectContent() 
 public PdfContentByte getDirectContentUnder() 
 protected int getNewObjectNumber(PdfReader reader,
    int number,
    int generation) 
 PdfContentByte getOverContent(int pageNum) 
 public PdfIndirectReference getPageReference(int page) 
 PdfStamperImp.PageStamp getPageStamp(int pageNum) 
 public Map getPdfLayers() 
    Gets the PdfLayer objects in an existing document as a Map with the names/titles of the layers as keys.
 RandomAccessFileOrArray getReaderFile(PdfReader reader) 
 PdfContentByte getUnderContent(int pageNum) 
  void insertPage(int pageNumber,
    Rectangle mediabox) 
 boolean isAppend() 
    Getter for property append.
 boolean isContentWritten() 
 boolean isRotateContents() 
    Getter for property rotateContents.
  void makePackage(PdfCollection collection) 
    Adds or replaces the Collection Dictionary in the Catalog.
 protected  void markUsed(PdfObject obj) 
 protected  void markUsed(int num) 
 boolean partialFormFlattening(String name) 
 protected  void readOCProperties() 
    Reads the OCProperties dictionary from the catalog of the existing document and fills the documentOCG, documentOCGorder and OCGRadioGroup variables in PdfWriter. Note that the original OCProperties of the existing document can contain more information.
 public  void registerReader(PdfReader reader,
    boolean openFile) throws IOException 
  void replacePage(PdfReader r,
    int pageImported,
    int pageReplaced) 
 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.
 public  void setDuration(int seconds) 
    Always throws an UnsupportedOperationException.
  void setDuration(int seconds,
    int page) 
    Sets the display duration for the page (for presentations)
  void setFormFlattening(boolean flat) 
  void setFreeTextFlattening(boolean flat) 
  void setJavaScript() throws IOException 
 public  void setOpenAction(PdfAction action) 
 public  void setOpenAction(String name) 
  void setOutlines() throws IOException 
 public  void setPageAction(PdfName actionType,
    PdfAction action) throws PdfException 
    Always throws an UnsupportedOperationException.
  void setPageAction(PdfName actionType,
    PdfAction action,
    int page) throws PdfException 
    Sets the open and close page additional action.
  void setRotateContents(boolean rotateContents) 
    Setter for property rotateContents.
 public  void setSigFlags(int f) 
    Set the signature flags.
 public  void setThumbnail(Image image) 
  void setThumbnail(Image image,
    int page) throws PdfException, DocumentException 
 public  void setTransition(PdfTransition transition) 
    Always throws an UnsupportedOperationException.
  void setTransition(PdfTransition transition,
    int page) 
    Sets the transition for the page
 public  void setViewerPreferences(int preferences) 
    Sets the viewer preferences.
  void sweepKids(PdfObject obj) 
 public  void unRegisterReader(PdfReader reader)