Home » iText-2.1.7 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfWriter [javadoc | source]
java.lang.Object
   com.lowagie.text.DocWriter
      com.lowagie.text.pdf.PdfWriter

All Implemented Interfaces:
    PdfPageActions, PdfRunDirection, PdfViewerPreferences, PdfDocumentActions, PdfAnnotations, PdfXConformance, PdfEncryptionSettings, PdfVersion, DocListener

Direct Known Subclasses:
    PdfCopy, PdfStamperImp, PdfCopyFieldsImp, Wrt, PdfSmartCopy, PdfCopyFormsImp

A DocWriter class for PDF.

When this PdfWriter is added to a certain PdfDocument, the PDF representation of every Element added to this Document will be written to the outputstream.

Nested Class Summary:
public static class  PdfWriter.PdfBody  This class generates the structure of a PDF document.

This class covers the third section of Chapter 5 in the 'Portable Document Format Reference Manual version 1.3' (page 55-60). It contains the body of a PDF document (section 5.14) and it can also generate a Cross-reference Table (section 5.15). 

static class  PdfWriter.PdfTrailer  PdfTrailer is the PDF Trailer object.

This object is described in the 'Portable Document Format Reference Manual version 1.3' section 5.16 (page 59-60). 

Field Summary
public static final  int GENERATION_MAX    The highest generation number possible.
    since: iText - 2.1.6
 
protected  PdfDocument pdf    the pdfdocument object. 
protected  PdfContentByte directContent    The direct content in this document. 
protected  PdfContentByte directContentUnder    The direct content under in this document. 
protected  PdfBody body    body of the PDF document 
protected  PdfDictionary extraCatalog    Holds value of property extraCatalog this is used for Output Intents. 
protected  PdfPages root    The root of the page tree. 
protected  ArrayList pageReferences    The PdfIndirectReference to the pages. 
protected  int currentPageNumber    The current page number. 
protected  PdfName tabs    The value of the Tabs entry in the page dictionary.
    since: 2.1.5 -
 
protected  int prevxref    A number referring to the previous Cross-Reference Table. 
protected  List newBookmarks     
public static final  char VERSION_1_2    possible PDF version (header) 
public static final  char VERSION_1_3    possible PDF version (header) 
public static final  char VERSION_1_4    possible PDF version (header) 
public static final  char VERSION_1_5    possible PDF version (header) 
public static final  char VERSION_1_6    possible PDF version (header) 
public static final  char VERSION_1_7    possible PDF version (header) 
public static final  PdfName PDF_VERSION_1_2    possible PDF version (catalog) 
public static final  PdfName PDF_VERSION_1_3    possible PDF version (catalog) 
public static final  PdfName PDF_VERSION_1_4    possible PDF version (catalog) 
public static final  PdfName PDF_VERSION_1_5    possible PDF version (catalog) 
public static final  PdfName PDF_VERSION_1_6    possible PDF version (catalog) 
public static final  PdfName PDF_VERSION_1_7    possible PDF version (catalog) 
protected  PdfVersionImp pdf_version    Stores the version information for the header and the catalog. 
public static final  int PageLayoutSinglePage    A viewer preference 
public static final  int PageLayoutOneColumn    A viewer preference 
public static final  int PageLayoutTwoColumnLeft    A viewer preference 
public static final  int PageLayoutTwoColumnRight    A viewer preference 
public static final  int PageLayoutTwoPageLeft    A viewer preference 
public static final  int PageLayoutTwoPageRight    A viewer preference 
public static final  int PageModeUseNone    A viewer preference 
public static final  int PageModeUseOutlines    A viewer preference 
public static final  int PageModeUseThumbs    A viewer preference 
public static final  int PageModeFullScreen    A viewer preference 
public static final  int PageModeUseOC    A viewer preference 
public static final  int PageModeUseAttachments    A viewer preference 
public static final  int HideToolbar    A viewer preference 
public static final  int HideMenubar    A viewer preference 
public static final  int HideWindowUI    A viewer preference 
public static final  int FitWindow    A viewer preference 
public static final  int CenterWindow    A viewer preference 
public static final  int DisplayDocTitle    A viewer preference 
public static final  int NonFullScreenPageModeUseNone    A viewer preference 
public static final  int NonFullScreenPageModeUseOutlines    A viewer preference 
public static final  int NonFullScreenPageModeUseThumbs    A viewer preference 
public static final  int NonFullScreenPageModeUseOC    A viewer preference 
public static final  int DirectionL2R    A viewer preference 
public static final  int DirectionR2L    A viewer preference 
public static final  int PrintScalingNone    A viewer preference 
public static final  PdfName DOCUMENT_CLOSE    action value 
public static final  PdfName WILL_SAVE    action value 
public static final  PdfName DID_SAVE    action value 
public static final  PdfName WILL_PRINT    action value 
public static final  PdfName DID_PRINT    action value 
public static final  int SIGNATURE_EXISTS    signature value 
public static final  int SIGNATURE_APPEND_ONLY    signature value 
protected  byte[] xmpMetadata    XMP Metadata for the document. 
public static final  int PDFXNONE    A PDF/X level. 
public static final  int PDFX1A2001    A PDF/X level. 
public static final  int PDFX32002    A PDF/X level. 
public static final  int PDFA1A    PDFA-1A level. 
public static final  int PDFA1B    PDFA-1B level. 
public static final  int STANDARD_ENCRYPTION_40    Type of encryption 
public static final  int STANDARD_ENCRYPTION_128    Type of encryption 
public static final  int ENCRYPTION_AES_128    Type of encryption 
static final  int ENCRYPTION_MASK    Mask to separate the encryption type from the encryption mode. 
public static final  int DO_NOT_ENCRYPT_METADATA    Add this to the mode to keep the metadata in clear text 
public static final  int EMBEDDED_FILES_ONLY    Add this to the mode to keep encrypt only the embedded files.
    since: 2.1.3 -
 
public static final  int ALLOW_PRINTING    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_MODIFY_CONTENTS    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_COPY    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_MODIFY_ANNOTATIONS    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_FILL_IN    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_SCREENREADERS    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_ASSEMBLY    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int ALLOW_DEGRADED_PRINTING    The operation permitted when the document is opened with the user password
    since: 2.0.7 -
 
public static final  int AllowPrinting   
     
    public static final  int AllowModifyContents   
       
      public static final  int AllowCopy   
         
        public static final  int AllowModifyAnnotations   
           
          public static final  int AllowFillIn   
             
            public static final  int AllowScreenReaders   
               
              public static final  int AllowAssembly   
                 
                public static final  int AllowDegradedPrinting   
                   
                  public static final  boolean STRENGTH40BITS   
                     
                    public static final  boolean STRENGTH128BITS   
                       
                      protected  PdfEncryption crypto    Contains the business logic for cryptography. 
                      protected  boolean fullCompression    Holds value of property fullCompression. 
                      protected  int compressionLevel    The compression level of the content streams.
                        since: 2.1.3 -
                       
                      protected  LinkedHashMap documentFonts    The fonts of this document 
                      protected  int fontNumber    The font number counter for the fonts in the document. 
                      protected  HashMap formXObjects    The form XObjects in this document. The key is the xref and the value is Object[]{PdfName, template}. 
                      protected  int formXObjectsCounter    The name counter for the form XObjects name. 
                      protected  HashMap importedPages     
                      protected  PdfReaderInstance currentPdfReaderInstance     
                      protected  HashMap documentColors    The colors of this document 
                      protected  int colorNumber    The color number counter for the colors in the document. 
                      protected  HashMap documentPatterns    The patterns of this document 
                      protected  int patternNumber    The pattern number counter for the colors in the document. 
                      protected  HashMap documentShadingPatterns     
                      protected  HashMap documentShadings     
                      protected  HashMap documentExtGState     
                      protected  HashMap documentProperties     
                      protected  boolean tagged     
                      protected  PdfStructureTreeRoot structureTreeRoot     
                      protected  HashSet documentOCG    A hashSet containing all the PdfLayer objects. 
                      protected  ArrayList documentOCGorder    An array list used to define the order of an OCG tree. 
                      protected  PdfOCProperties OCProperties    The OCProperties in a catalog dictionary. 
                      protected  PdfArray OCGRadioGroup    The RBGroups array in an OCG dictionary 
                      protected  PdfArray OCGLocked    The locked array in an OCG dictionary
                        since: 2.1.2 -
                       
                      public static final  PdfName PAGE_OPEN    action value 
                      public static final  PdfName PAGE_CLOSE    action value 
                      protected  PdfDictionary group    A group attributes dictionary specifying the attributes of the page's page group for use in the transparent imaging model 
                      public static final  float SPACE_CHAR_RATIO_DEFAULT    The default space-char ratio. 
                      public static final  float NO_SPACE_CHAR_RATIO    Disable the inter-character spacing. 
                      public static final  int RUN_DIRECTION_DEFAULT    Use the default run direction. 
                      public static final  int RUN_DIRECTION_NO_BIDI    Do not use bidirectional reordering. 
                      public static final  int RUN_DIRECTION_LTR    Use bidirectional reordering with left-to-right preferential run direction. 
                      public static final  int RUN_DIRECTION_RTL    Use bidirectional reordering with right-to-left preferential run direction. 
                      protected  int runDirection     
                      protected  float userunit     
                      protected  PdfDictionary defaultColorspace     
                      protected  HashMap documentSpotPatterns     
                      protected  ColorDetails patternColorspaceRGB     
                      protected  ColorDetails patternColorspaceGRAY     
                      protected  ColorDetails patternColorspaceCMYK     
                      protected  PdfDictionary imageDictionary    Dictionary, containing all the images of the PDF document 
                      protected  HashMap JBIG2Globals    A HashSet with Stream objects containing JBIG2 Globals
                        since: 2.1.5 -
                       
                      Fields inherited from com.lowagie.text.DocWriter:
                      NEWLINE,  TAB,  LT,  SPACE,  EQUALS,  QUOTE,  GT,  FORWARD,  pageSize,  document,  os,  open,  pause,  closeStream
                      Constructor:
                       protected PdfWriter() 
                       protected PdfWriter(PdfDocument document,
                          OutputStream os) 
                        Constructs a PdfWriter.

                        Remark: a PdfWriter can only be constructed by calling the method getInstance(Document document, OutputStream os).

                        Parameters:
                        document - The PdfDocument that has to be written
                        os - The OutputStream the writer has to write to.
                      Method from com.lowagie.text.pdf.PdfWriter Summary:
                      add,   add,   add,   addAnnotation,   addAnnotation,   addCalculationOrder,   addDeveloperExtension,   addDirectImageSimple,   addDirectImageSimple,   addDirectTemplateSimple,   addFileAttachment,   addFileAttachment,   addFileAttachment,   addJavaScript,   addJavaScript,   addJavaScript,   addJavaScript,   addJavaScript,   addJavaScript,   addLocalDestinations,   addOCGRadioGroup,   addSharedObjectsToBody,   addSimple,   addSimple,   addSimpleExtGState,   addSimplePattern,   addSimplePatternColorspace,   addSimpleProperty,   addSimpleShading,   addSimpleShadingPattern,   addToBody,   addToBody,   addToBody,   addToBody,   addToBody,   addToBody,   addViewerPreference,   clearTextWrap,   close,   createXmpMetadata,   eliminateFontSubset,   fillOCProperties,   fitsPage,   fitsPage,   freeReader,   getAcroForm,   getBoxSize,   getCatalog,   getColorspaceName,   getCompressionLevel,   getCurrentDocumentSize,   getCurrentPage,   getCurrentPageNumber,   getDefaultColorspace,   getDirectContent,   getDirectContentUnder,   getEncryption,   getExtraCatalog,   getGroup,   getImageReference,   getImportedPage,   getIndirectReferenceNumber,   getInfo,   getInstance,   getInstance,   getNewObjectNumber,   getOCProperties,   getOs,   getPDFXConformance,   getPageEvent,   getPageNumber,   getPageReference,   getPageSize,   getPdfDocument,   getPdfIndirectReference,   getPdfVersion,   getReaderFile,   getReferenceJBIG2Globals,   getRootOutline,   getRunDirection,   getSpaceCharRatio,   getStructureTreeRoot,   getTabs,   getUserunit,   getVerticalPosition,   isFullCompression,   isPdfX,   isRgbTransparencyBlending,   isStrictImageSequence,   isTagged,   isUserProperties,   lockLayer,   open,   propertyExists,   registerLayer,   releaseTemplate,   reorderPages,   resetContent,   setAdditionalAction,   setAtLeastPdfVersion,   setBoxSize,   setCollection,   setCompressionLevel,   setCropBoxSize,   setDefaultColorspace,   setDuration,   setEncryption,   setEncryption,   setEncryption,   setEncryption,   setEncryption,   setFullCompression,   setGroup,   setInitialLeading,   setLinearPageMode,   setOpenAction,   setOpenAction,   setOutlines,   setOutputIntents,   setOutputIntents,   setOutputIntents,   setPDFXConformance,   setPageAction,   setPageEmpty,   setPageEvent,   setPageLabels,   setPageXmpMetadata,   setPdfVersion,   setPdfVersion,   setRgbTransparencyBlending,   setRunDirection,   setSigFlags,   setSpaceCharRatio,   setStrictImageSequence,   setTabs,   setTagged,   setThumbnail,   setTransition,   setUserProperties,   setUserunit,   setViewerPreferences,   setXmpMetadata,   writeOutlines
                      Methods from com.lowagie.text.DocWriter:
                      add,   addTabs,   close,   flush,   getISOBytes,   isCloseStream,   isPaused,   newPage,   open,   pause,   resetFooter,   resetHeader,   resetPageCount,   resume,   setCloseStream,   setFooter,   setHeader,   setMarginMirroring,   setMarginMirroringTopBottom,   setMargins,   setPageCount,   setPageSize,   write,   write,   writeEnd,   writeEnd,   writeMarkupAttributes,   writeStart
                      Methods from java.lang.Object:
                      clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
                      Method from com.lowagie.text.pdf.PdfWriter Detail:
                       protected PdfIndirectReference add(PdfICCBased icc) 
                       PdfIndirectReference add(PdfPage page,
                          PdfContents contents) throws PdfException 
                        Adds some PdfContents to this Writer.

                        The document has to be open before you can begin to add content to the body of the document.

                       PdfIndirectReference add(PdfImage pdfImage,
                          PdfIndirectReference fixedRef) throws PdfException 
                        Writes a PdfImage to the outputstream.
                       public  void addAnnotation(PdfAnnotation annot) 
                        void addAnnotation(PdfAnnotation annot,
                          int page) 
                       public  void addCalculationOrder(PdfFormField annot) 
                       public  void addDeveloperExtension(PdfDeveloperExtension de) 
                       public PdfName addDirectImageSimple(Image image) throws PdfException, DocumentException 
                        Use this method to adds an image to the document but not to the page resources. It is used with templates and Document.add(Image). Use this method only if you know what you're doing!
                       public PdfName addDirectImageSimple(Image image,
                          PdfIndirectReference fixedRef) throws PdfException, DocumentException 
                        Adds an image to the document but not to the page resources. It is used with templates and Document.add(Image). Use this method only if you know what you're doing!
                       PdfName addDirectTemplateSimple(PdfTemplate template,
                          PdfName forcedName) 
                        Adds a template to the document but not to the page resources.
                       public  void addFileAttachment(PdfFileSpecification fs) throws IOException 
                        Use this method to add a file attachment at the document level.
                       public  void addFileAttachment(String description,
                          PdfFileSpecification fs) throws IOException 
                        Use this method to add a file attachment at the document level.
                       public  void addFileAttachment(String description,
                          byte[] fileStore,
                          String file,
                          String fileDisplay) throws IOException 
                        Use this method to add a file attachment at the document level.
                       public  void addJavaScript(PdfAction js) 
                        Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
                       public  void addJavaScript(String code) 
                        Use this method to adds a JavaScript action at the document level. When the document opens, all this JavaScript runs.
                       public  void addJavaScript(String code,
                          boolean unicode) 
                        Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
                       public  void addJavaScript(String name,
                          PdfAction js) 
                        Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
                       public  void addJavaScript(String name,
                          String code) 
                        Use this method to adds a JavaScript action at the document level. When the document opens, all this JavaScript runs.
                       public  void addJavaScript(String name,
                          String code,
                          boolean unicode) 
                        Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.
                        void addLocalDestinations(TreeMap dest) throws IOException 
                        Adds the local destinations to the body of the document.
                       public  void addOCGRadioGroup(ArrayList group) 
                        Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm. That is, the state of at most one optional content group in the array should be ON at a time: if one group is turned ON, all others must be turned OFF.
                       protected  void addSharedObjectsToBody() throws IOException 
                       FontDetails addSimple(BaseFont bf) 
                        Adds a BaseFont to the document but not to the page resources. It is used for templates.
                       ColorDetails addSimple(PdfSpotColor spc) 
                        Adds a SpotColor to the document but not to the page resources.
                       PdfObject[] addSimpleExtGState(PdfDictionary gstate) 
                       PdfName addSimplePattern(PdfPatternPainter painter) 
                       ColorDetails addSimplePatternColorspace(Color color) 
                       PdfObject[] addSimpleProperty(Object prop,
                          PdfIndirectReference refi) 
                        void addSimpleShading(PdfShading shading) 
                        void addSimpleShadingPattern(PdfShadingPattern shading) 
                       public PdfIndirectObject addToBody(PdfObject object) throws IOException 
                        Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!
                       public PdfIndirectObject addToBody(PdfObject object,
                          boolean inObjStm) throws IOException 
                        Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!
                       public PdfIndirectObject addToBody(PdfObject object,
                          PdfIndirectReference ref) throws IOException 
                        Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!
                       public PdfIndirectObject addToBody(PdfObject object,
                          int refNumber) throws IOException 
                        Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!
                       public PdfIndirectObject addToBody(PdfObject object,
                          PdfIndirectReference ref,
                          boolean inObjStm) throws IOException 
                        Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!
                       public PdfIndirectObject addToBody(PdfObject object,
                          int refNumber,
                          boolean inObjStm) throws IOException 
                        Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!
                       public  void addViewerPreference(PdfName key,
                          PdfObject value) 
                       public  void clearTextWrap() throws DocumentException 
                        Use this method to clear text wrapping around images (if applicable).
                       public  void close() 
                        Signals that the Document was closed and that no other Elements will be added.

                        The pages-tree is built and written to the outputstream. A Catalog is constructed, as well as an Info-object, the reference table is composed and everything is written to the outputstream embedded in a Trailer.

                       public  void createXmpMetadata() 
                        Use this method to creates XMP Metadata based on the metadata in the PdfDocument.
                        void eliminateFontSubset(PdfDictionary fonts) 
                       protected  void fillOCProperties(boolean erase) 
                       public boolean fitsPage(Table table) 
                        Checks if a Table fits the current page of the PdfDocument.
                       public boolean fitsPage(Table table,
                          float margin) 
                        Checks if a Table fits the current page of the PdfDocument.
                       public  void freeReader(PdfReader reader) throws IOException 
                        Use this method to writes the reader to the document and free the memory used by it. The main use is when concatenating multiple documents to keep the memory usage restricted to the current appending document.
                       public PdfAcroForm getAcroForm() 
                       public Rectangle getBoxSize(String boxName) 
                        Use this method to get the size of a trim, art, crop or bleed box, or null if not defined.
                       protected PdfDictionary getCatalog(PdfIndirectReference rootObj) 
                       PdfName getColorspaceName() 
                       public int getCompressionLevel() 
                        Returns the compression level used for streams written by this writer.
                       public int getCurrentDocumentSize() 
                        Use this method to gets the current document size. This size only includes the data already written to the output stream, it does not include templates or fonts. It is useful if used with freeReader() when concatenating many documents and an idea of the current size is needed.
                       PdfIndirectReference getCurrentPage() 
                       public int getCurrentPageNumber() 
                       public PdfDictionary getDefaultColorspace() 
                        Use this method to get the default colorspaces.
                       public PdfContentByte getDirectContent() 
                        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.
                       public PdfContentByte getDirectContentUnder() 
                        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.
                       PdfEncryption getEncryption() 
                       public PdfDictionary getExtraCatalog() 
                        Sets extra keys to the catalog.
                       public PdfDictionary getGroup() 
                        Use this method to get the group dictionary.
                       PdfIndirectReference getImageReference(PdfName name) 
                        return the PdfIndirectReference to the image with a given name.
                       public PdfImportedPage getImportedPage(PdfReader reader,
                          int pageNumber) 
                        Use this method to get a page from other PDF document. The page can be used as any other PdfTemplate. Note that calling this method more than once with the same parameters will retrieve the same object.
                       int getIndirectReferenceNumber() 
                       public PdfDictionary getInfo() 
                        Use this method to get the info dictionary if you want to change it directly (add keys and values to the info dictionary).
                       public static PdfWriter getInstance(Document document,
                          OutputStream os) throws DocumentException 
                        Use this method to get an instance of the PdfWriter.
                       public static PdfWriter getInstance(Document document,
                          OutputStream os,
                          DocListener listener) throws DocumentException 
                        Use this method to get an instance of the PdfWriter.
                       protected int getNewObjectNumber(PdfReader reader,
                          int number,
                          int generation) 
                       public PdfOCProperties getOCProperties() 
                        Use this method to get the Optional Content Properties Dictionary. Each call fills the dictionary with the current layer state. It's advisable to only call this method right before close and do any modifications at that time.
                       OutputStreamCounter getOs() 
                        Returns the outputStreamCounter.
                       public int getPDFXConformance() 
                       public PdfPageEvent getPageEvent() 
                        Gets the PdfPageEvent for this document or null if none is set.
                       public int getPageNumber() 
                        Gets the pagenumber of this document. This number can be different from the real pagenumber, if you have (re)set the page number previously.
                       public PdfIndirectReference getPageReference(int page) 
                        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.
                       public Rectangle getPageSize() 
                        Use this method to get the size of the media box.
                       PdfDocument getPdfDocument() 
                        Gets the PdfDocument associated with this writer.
                       public PdfIndirectReference getPdfIndirectReference() 
                        Use this to get an PdfIndirectReference for an object that will be created in the future. Use this method only if you know what you're doing!
                       PdfVersionImp getPdfVersion() 
                        Returns the version information.
                       RandomAccessFileOrArray getReaderFile(PdfReader reader) 
                       protected PdfIndirectReference getReferenceJBIG2Globals(byte[] content) 
                        Gets an indirect reference to a JBIG2 Globals stream. Adds the stream if it hasn't already been added to the writer.
                       public PdfOutline getRootOutline() 
                        Use this method to get the root outline and construct bookmarks.
                       public int getRunDirection() 
                        Use this method to set the run direction.
                       public float getSpaceCharRatio() 
                        Use this method to gets the space/character extra spacing ratio for fully justified text.
                       public PdfStructureTreeRoot getStructureTreeRoot() 
                        Gets the structure tree root. If the document is not marked for tagging it will return null.
                       public PdfName getTabs() 
                        Returns the value to be used for the Tabs entry in the page tree.
                       public float getUserunit() 
                        Use this method to get the user unit. A user unit is a value that defines the default user space unit. The minimum UserUnit is 1 (1 unit = 1/72 inch). The maximum UserUnit is 75,000. Note that this userunit only works starting with PDF1.6!
                       public float getVerticalPosition(boolean ensureNewLine) 
                        Use this method to get the current vertical page position.
                       public boolean isFullCompression() 
                        Use this method to find out if 1.5 compression is on.
                       public boolean isPdfX() 
                       public boolean isRgbTransparencyBlending() 
                        Gets the transparency blending colorspace.
                       public boolean isStrictImageSequence() 
                        Use this method to get the strictImageSequence status.
                       public boolean isTagged() 
                        Check if the document is marked for tagging.
                       public boolean isUserProperties() 
                        Gets the flag indicating the presence of structure elements that contain user properties attributes.
                       public  void lockLayer(PdfLayer layer) 
                        Use this method to lock an optional content group. The state of a locked group cannot be changed through the user interface of a viewer application. Producers can use this entry to prevent the visibility of content that depends on these groups from being changed by users.
                       public  void open() 
                        Signals that the Document has been opened and that Elements can be added.

                        When this method is called, the PDF-document header is written to the outputstream.

                       boolean propertyExists(Object prop) 
                        void registerLayer(PdfOCG layer) 
                       public  void releaseTemplate(PdfTemplate tp) throws IOException 
                        Use this method to releases the memory used by a template. This method writes the template to the output. The template can still be added to any content but changes to the template itself won't have any effect.
                       public int reorderPages(int[] order) throws DocumentException 
                        Use this method to reorder the pages in the document. A null argument value only returns the number of pages to process. It is advisable to issue a Document.newPage() before using this method.
                        void resetContent() 
                        Resets all the direct contents to empty. This happens when a new page is started.
                       public  void setAdditionalAction(PdfName actionType,
                          PdfAction action) throws DocumentException 
                       public  void setAtLeastPdfVersion(char version) 
                       public  void setBoxSize(String boxName,
                          Rectangle size) 
                        Use this method to set the page box sizes. Allowed names are: "crop", "trim", "art" and "bleed".
                       public  void setCollection(PdfCollection collection) 
                        Use this method to add the Collection dictionary.
                       public  void setCompressionLevel(int compressionLevel) 
                        Sets the compression level to be used for streams written by this writer.
                       public  void setCropBoxSize(Rectangle crop) 
                        Use this method to set the crop box. The crop box should not be rotated even if the page is rotated. This change only takes effect in the next page.
                       public  void setDefaultColorspace(PdfName key,
                          PdfObject cs) 
                        Use this method to sets the default colorspace that will be applied to all the document. The colorspace is only applied if another colorspace with the same name is not present in the content.

                        The colorspace is applied immediately when creating templates and at the page end for the main document content.

                       public  void setDuration(int seconds) 
                       public  void setEncryption(Certificate[] certs,
                          int[] permissions,
                          int encryptionType) throws DocumentException 
                       public  void setEncryption(byte[] userPassword,
                          byte[] ownerPassword,
                          int permissions,
                          int encryptionType) throws DocumentException 
                       public  void setEncryption(byte[] userPassword,
                          byte[] ownerPassword,
                          int permissions,
                          boolean strength128Bits) throws DocumentException 
                      Deprecated! As - of iText 2.0.3, replaced by (@link #setEncryption(byte[], byte[], int, int)}. Scheduled for removal at or after 2.2.0

                        Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
                       public  void setEncryption(boolean strength,
                          String userPassword,
                          String ownerPassword,
                          int permissions) throws DocumentException 
                      Deprecated! As - of iText 2.0.3, replaced by (@link #setEncryption(byte[], byte[], int, int)}. Scheduled for removal at or after 2.2.0

                        Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
                       public  void setEncryption(int encryptionType,
                          String userPassword,
                          String ownerPassword,
                          int permissions) throws DocumentException 
                      Deprecated! As - of iText 2.0.3, replaced by (@link #setEncryption(byte[], byte[], int, int)}. Scheduled for removal at or after 2.2.0

                        Sets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.
                       public  void setFullCompression() 
                        Use this method to set the document's compression to the PDF 1.5 mode with object streams and xref streams. It can be set at any time but once set it can't be unset.

                        If set before opening the document it will also set the pdf version to 1.5.

                       public  void setGroup(PdfDictionary group) 
                        Use this method to set the group dictionary.
                       public  void setInitialLeading(float leading) throws DocumentException 
                        Sets the initial leading for the PDF document. This has to be done before the document is opened.
                       public  void setLinearPageMode() 
                        Use this method to make sure the page tree has a linear structure (every leave is attached directly to the root). Use this method to allow page reordering with method reorderPages.
                       public  void setOpenAction(String name) 
                       public  void setOpenAction(PdfAction action) 
                       public  void setOutlines(List outlines) 
                       public boolean setOutputIntents(PdfReader reader,
                          boolean checkExistence) throws IOException 
                        Use this method to copy the output intent dictionary from another document to this one.
                       public  void setOutputIntents(String outputConditionIdentifier,
                          String outputCondition,
                          String registryName,
                          String info,
                          ICC_Profile colorProfile) throws IOException 
                        Sets the values of the output intent dictionary. Null values are allowed to suppress any key.
                       public  void setOutputIntents(String outputConditionIdentifier,
                          String outputCondition,
                          String registryName,
                          String info,
                          byte[] destOutputProfile) throws IOException 
                        Sets the values of the output intent dictionary. Null values are allowed to suppress any key. Prefer the ICC_Profile-based version of this method.
                       public  void setPDFXConformance(int pdfx) 
                       public  void setPageAction(PdfName actionType,
                          PdfAction action) throws DocumentException 
                       public  void setPageEmpty(boolean pageEmpty) 
                        Use this method to make sure a page is added, even if it's empty. If you use setPageEmpty(false), invoking newPage() after a blank page will add a newPage.
                       public  void setPageEvent(PdfPageEvent event) 
                        Sets the PdfPageEvent for this document.
                       public  void setPageLabels(PdfPageLabels pageLabels) 
                        Use this method to add page labels
                       public  void setPageXmpMetadata(byte[] xmpMetadata) 
                        Use this method to set the XMP Metadata for each page.
                       public  void setPdfVersion(char version) 
                       public  void setPdfVersion(PdfName version) 
                       public  void setRgbTransparencyBlending(boolean rgbTransparencyBlending) 
                        Sets the transparency blending colorspace to RGB. The default blending colorspace is CMYK and will result in faded colors in the screen and in printing. Calling this method will return the RGB colors to what is expected. The RGB blending will be applied to all subsequent pages until other value is set. Note that this is a generic solution that may not work in all cases.
                       public  void setRunDirection(int runDirection) 
                        Use this method to set the run direction. This is only used as a placeholder as it does not affect anything.
                       public  void setSigFlags(int f) 
                       public  void setSpaceCharRatio(float spaceCharRatio) 
                        Use this method to set the ratio between the extra word spacing and the extra character spacing when the text is fully justified. Extra word spacing will grow spaceCharRatio times more than extra character spacing. If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO then the extra character spacing will be zero.
                       public  void setStrictImageSequence(boolean strictImageSequence) 
                        Use this method to set the image sequence, so that it follows the text in strict order (or not).
                       public  void setTabs(PdfName tabs) 
                        Sets the value for the Tabs entry in the page tree.
                       public  void setTagged() 
                        Mark this document for tagging. It must be called before open.
                       public  void setThumbnail(Image image) throws PdfException, DocumentException 
                        Use this method to set the thumbnail image for the current page.
                       public  void setTransition(PdfTransition transition) 
                       public  void setUserProperties(boolean userProperties) 
                        Sets the flag indicating the presence of structure elements that contain user properties attributes.
                       public  void setUserunit(float userunit) throws DocumentException 
                        Use this method to set the user unit. A UserUnit is a value that defines the default user space unit. The minimum UserUnit is 1 (1 unit = 1/72 inch). The maximum UserUnit is 75,000. Note that this userunit only works starting with PDF1.6!
                       public  void setViewerPreferences(int preferences) 
                       public  void setXmpMetadata(byte[] xmpMetadata) 
                        Use this method to set the XMP Metadata.
                       protected  void writeOutlines(PdfDictionary catalog,
                          boolean namedAsNames) throws IOException