Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text.pdf
Class PdfDocument

    java.lang.Object
      com.lowagie.text.Document
          com.lowagie.text.pdf.PdfDocument

All Implemented Interfaces:
  DocListener, ElementListener, EventListener

     class PdfDocument

extends Document

`PdfDocument` is the class that is used by `PdfWriter` to translate a `Document` into a PDF with different pages.

A `PdfDocument` always listens to a `Document` and adds the Pdf representation of every `Element` that is added to the `Document`.

See Also:
  `Document`, `DocListener`, `PdfWriter`

Nested Class Summary
`static class` | `PdfDocument.Indentation`
`(package private) static class` | `PdfDocument.PdfCatalog` `PdfCatalog` is the PDF Catalog-object.
`static class` | `PdfDocument.PdfInfo` `PdfInfo` is the PDF InfoDictionary.
`private static class` | `PdfDocument.RenderingContext` This is a helper class for adding a Table to a document.

Field Summary
`private PdfDictionary` | `additionalActions`
`private int` | `alignment` This represents the current alignment of the PDF Elements.
`private PdfAction` | `anchorAction` The current active `PdfAction` when processing an `Anchor`.
`(package private) PdfAnnotationsImp` | `annotationsImp`
`protected HashMap` | `boxSize` This is the size of the several boxes that will be used in the next page.
`private PdfCollection` | `collection`
`private float` | `currentHeight` This is the current height of the document.
`private PdfOutline` | `currentOutline` This is the current `PdfOutline` in the hierarchy of outlines.
`private HashMap` | `documentFileAttachment`
`private HashMap` | `documentLevelJS`
`protected int` | `duration` The duration of the page
`private boolean` | `firstPageEvent` Signals that OnOpenDocument should be called.
`private PdfContentByte` | `graphics` This is the PdfContentByte object, containing the borders and other Graphics.
`(package private) static String` | `hangingPunctuation` The characters to be applied the hanging punctuation.
`private float` | `imageEnd` This is the position where the image ends.
`private Image` | `imageWait` This is the image that could not be shown on a previous page.
`(package private) PdfDocument.Indentation` | `indentation`
`private PdfDocument.PdfInfo` | `info` some meta information about the Document.
`private boolean` | `isParagraph` Signals that onParagraph is valid (to avoid that a Chapter/Section title is treated as a Paragraph).
`(package private) int` | `jsCounter` Stores a list of document level JavaScript actions.
`private int` | `lastElementType` Holds the type of the last element, that has been added to the document.
`private float` | `leading` This represents the leading of the lines.
`private PdfLine` | `line` The line that is currently being written.
`private ArrayList` | `lines` The lines that are written until now.
`private TreeMap` | `localDestinations` Stores the destinations keyed by name.
`protected int` | `markPoint`
`protected float` | `nextMarginBottom` margin in y direction starting from the bottom.
`protected float` | `nextMarginLeft` margin in x direction starting from the left.
`protected float` | `nextMarginRight` margin in x direction starting from the right.
`protected float` | `nextMarginTop` margin in y direction starting from the top.
`protected Rectangle` | `nextPageSize` This is the size of the next page.
`private PdfAction` | `openActionAction`
`private String` | `openActionName`
`protected PdfDictionary` | `pageAA`
`private boolean` | `pageEmpty` This checks if the page is empty.
`protected PdfPageLabels` | `pageLabels`
`protected PageResources` | `pageResources` This are the page resources of the current Page.
`private PdfOutline` | `rootOutline` This is the root outline of the document.
`private DecimalFormat` | `SIXTEEN_DIGITS`
`private boolean` | `strictImageSequence` Holds value of property strictImageSequence.
`private PdfContentByte` | `text` This is the PdfContentByte object, containing the text.
`private int` | `textEmptySize`
`protected HashMap` | `thisBoxSize` This is the size of the several boxes of the current Page.
`private PdfIndirectReference` | `thumb`
`protected PdfTransition` | `transition` The page transition
`protected PdfViewerPreferencesImp` | `viewerPreferences` Contains the Viewer preferences of this PDF document.
`private PdfWriter` | `writer` The `PdfWriter`.
`protected byte[]` | `xmpMetadata` XMP Metadata for the page.

Fields inherited from class com.lowagie.text.Document
`chapternumber, close, compress, footer, header, htmlStyleClass, javaScript_onLoad, javaScript_onUnLoad, marginBottom, marginLeft, marginMirroring, marginRight, marginTop, open, pageN, pageSize, plainRandomAccess, wmfFontCorrection`

Constructor Summary
`PdfDocument()` Constructs a new PDF document.

Method Summary
`boolean` | `add(Element element)` Signals that an `Element` was added to the `Document`.
`private void` | `add(Image image)` Adds an image to the document.
`private void` | `add(PdfTable table, boolean onlyFirstPage)` Adds a new table to the document.
`(package private) void` | `addAdditionalAction(PdfName actionType, PdfAction action)`
`(package private) void` | `addAnnotation(PdfAnnotation annot)`
`(package private) void` | `addCalculationOrder(PdfFormField formField)`
`(package private) void` | `addFileAttachment(String description, PdfFileSpecification fs)`
`(package private) void` | `addJavaScript(PdfAction js)`
`(package private) void` | `addJavaScript(String name, PdfAction js)`
`(package private) void` | `addOutline(PdfOutline outline, String name)` Adds a named outline to the document .
`(package private) void` | `addPTable(PdfPTable ptable)` Adds a `PdfPTable` to the document.
`private void` | `addSpacing(float extraspace, float oldleading, Font f)` Adds extra space.
`(package private) void` | `addViewerPreference(PdfName key, PdfObject value)`
`void` | `addWriter(PdfWriter writer)` Adds a `PdfWriter` to the `PdfDocument`.
`private void` | `analyzeRow(ArrayList rows, PdfDocument.RenderingContext ctx)`
`(package private) float` | `bottom(Table table)` Returns the bottomvalue of a `Table` if it were added to this document.
`(package private) void` | `calculateOutlineCount()` Updates the count in the outlines.
`private void` | `carriageReturn()` If the current line is not empty or null, it is added to the arraylist of lines and a new empty line is added.
`void` | `clearTextWrap()` Method added by Pelikan Stephan
`void` | `close()` Closes the document.
`private void` | `consumeRowspan(ArrayList row, PdfDocument.RenderingContext ctx)`
`private void` | `doFooter()`
`private void` | `doHeader()`
`private void` | `ensureNewLine()` Ensures that a new line has been started.
`private ArrayList` | `extractRows(ArrayList cells, PdfDocument.RenderingContext ctx)`
`(package private) boolean` | `fitsPage(PdfPTable table, float margin)` Checks if a `PdfPTable` fits the current page of the `PdfDocument`.
`private float` | `flushLines()` Writes all the lines to the text-object.
`(package private) PdfAcroForm` | `getAcroForm()` Gets the AcroForm object.
`(package private) Rectangle` | `getBoxSize(String boxName)` Gives the size of a trim, art, crop or bleed box, or null if not defined.
`(package private) PdfDocument.PdfCatalog` | `getCatalog(PdfIndirectReference pages)` Gets the `PdfCatalog`-object.
`(package private) HashMap` | `getDocumentFileAttachment()`
`(package private) HashMap` | `getDocumentLevelJS()`
`(package private) PdfDocument.PdfInfo` | `getInfo()` Gets the `PdfInfo`-object.
`(package private) PdfAction` | `getLocalGotoAction(String name)`
`(package private) int` | `getMarkPoint()`
`(package private) PageResources` | `getPageResources()`
`(package private) PdfTable` | `getPdfTable(Table table, boolean supportRowAdditions)` Gets a PdfTable object (contributed by dperezcar@fcc.es)
`PdfOutline` | `getRootOutline()` Gets the root outline.
`float` | `getVerticalPosition(boolean ensureNewLine)` Gets the current vertical page position.
`(package private) void` | `incMarkPoint()`
`(package private) float` | `indentBottom()` Gets the indentation on the bottom side.
`private float` | `indentLeft()` Gets the indentation on the left side.
`private float` | `indentRight()` Gets the indentation on the right side.
`private float` | `indentTop()` Gets the indentation on the top side.
`private void` | `initPage()` Initializes a page.
`(package private) boolean` | `isStrictImageSequence()` Getter for property strictImageSequence.
`(package private) boolean` | `localDestination(String name, PdfDestination destination)` The local destination to where a local goto with the same name will jump to.
`(package private) void` | `localGoto(String name, float llx, float lly, float urx, float ury)` Implements a link to other part of the document.
`private boolean` | `mayBeRemoved(ArrayList row)`
`private void` | `newLine()` Adds the current line to the list of lines and also adds an empty line.
`boolean` | `newPage()` Makes a new page and sends it to the `PdfWriter`.
`void` | `open()` Opens the document.
`(package private) void` | `outlineTree(PdfOutline outline)` Recursive method used to write outlines.
`(package private) void` | `remoteGoto(String filename, int page, float llx, float lly, float urx, float ury)` Implements a link to another document.
`(package private) void` | `remoteGoto(String filename, String name, float llx, float lly, float urx, float ury)` Implements a link to another document.
`private void` | `renderCells(PdfDocument.RenderingContext ctx, List cells, boolean hasToFit)`
`void` | `resetFooter()` Resets the footer of this document.
`void` | `resetHeader()` Resets the header of this document.
`void` | `resetPageCount()` Sets the page number to 0.
`(package private) void` | `setAction(PdfAction action, float llx, float lly, float urx, float ury)` Implements an action in an area.
`(package private) void` | `setBoxSize(String boxName, Rectangle size)`
`void` | `setCollection(PdfCollection collection)` Sets the collection dictionary.
`(package private) void` | `setCropBoxSize(Rectangle crop)`
`(package private) void` | `setDuration(int seconds)` Sets the display duration for the page (for presentations)
`void` | `setFooter(HeaderFooter footer)` Changes the footer of this document.
`void` | `setHeader(HeaderFooter header)` Changes the header of this document.
`boolean` | `setMarginMirroring(boolean MarginMirroring)` Set the margin mirroring.
`boolean` | `setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)` Sets the margins.
`private void` | `setNewPageSizeAndMargins()`
`(package private) void` | `setOpenAction(PdfAction action)`
`(package private) void` | `setOpenAction(String name)`
`(package private) void` | `setPageAction(PdfName actionType, PdfAction action)`
`void` | `setPageCount(int pageN)` Sets the page number.
`(package private) void` | `setPageEmpty(boolean pageEmpty)`
`(package private) void` | `setPageLabels(PdfPageLabels pageLabels)` Sets the page labels
`boolean` | `setPageSize(Rectangle pageSize)` Sets the pagesize.
`(package private) void` | `setSigFlags(int f)`
`(package private) void` | `setStrictImageSequence(boolean strictImageSequence)` Setter for property strictImageSequence.
`(package private) void` | `setThumbnail(Image image)`
`(package private) void` | `setTransition(PdfTransition transition)` Sets the transition for the page
`(package private) void` | `setViewerPreferences(int preferences)`
`void` | `setXmpMetadata(byte[] xmpMetadata)` Use this method to set the XMP Metadata.
`(package private) void` | `traverseOutlineCount(PdfOutline outline)` Recursive method to update the count in the outlines.
`(package private) void` | `writeLineToContent(PdfLine line, PdfContentByte text, PdfContentByte graphics, Object[] currentValues, float ratio)` Writes a text line to the document.
`(package private) void` | `writeOutlines()` Writes the outline tree to the body of the PDF document.

Methods inherited from class com.lowagie.text.Document
`addAuthor, addCreationDate, addCreator, addDocListener, addHeader, addKeywords, addProducer, addSubject, addTitle, bottom, bottom, bottomMargin, getHtmlStyleClass, getJavaScript_onLoad, getJavaScript_onUnLoad, getPageNumber, getPageSize, getVersion, isMarginMirroring, isOpen, left, left, leftMargin, removeDocListener, right, right, rightMargin, setHtmlStyleClass, setJavaScript_onLoad, setJavaScript_onUnLoad, top, top, topMargin`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### writer

    private PdfWriter writer

  The `PdfWriter`.

### text

    private PdfContentByte text

  This is the PdfContentByte object, containing the text.

### graphics

    private PdfContentByte graphics

  This is the PdfContentByte object, containing the borders and other Graphics.

### leading

    private float leading

  This represents the leading of the lines.

### alignment

    private int alignment

  This represents the current alignment of the PDF Elements.

### currentHeight

    private float currentHeight

  This is the current height of the document.

### isParagraph

    private boolean isParagraph

  Signals that onParagraph is valid (to avoid that a Chapter/Section title is treated as a Paragraph).

### anchorAction

    private PdfAction anchorAction

  The current active `PdfAction` when processing an `Anchor`.

### textEmptySize

    private int textEmptySize

### xmpMetadata

    protected byte[] xmpMetadata

  XMP Metadata for the page.

### nextMarginLeft

    protected float nextMarginLeft

  margin in x direction starting from the left. Will be valid in the next page

### nextMarginRight

    protected float nextMarginRight

  margin in x direction starting from the right. Will be valid in the next page

### nextMarginTop

    protected float nextMarginTop

  margin in y direction starting from the top. Will be valid in the next page

### nextMarginBottom

    protected float nextMarginBottom

  margin in y direction starting from the bottom. Will be valid in the next page

### firstPageEvent

    private boolean firstPageEvent

  Signals that OnOpenDocument should be called.

### line

    private PdfLine line

  The line that is currently being written.

### lines

    private ArrayList lines

  The lines that are written until now.

### lastElementType

    private int lastElementType

  Holds the type of the last element, that has been added to the document.

### hangingPunctuation

    static final String hangingPunctuation

  The characters to be applied the hanging punctuation.

  See Also:
    Constant Field Values

### indentation

    PdfDocument.Indentation indentation

### info

    private PdfDocument.PdfInfo info

  some meta information about the Document.

### rootOutline

    private PdfOutline rootOutline

  This is the root outline of the document.

### currentOutline

    private PdfOutline currentOutline

  This is the current `PdfOutline` in the hierarchy of outlines.

### viewerPreferences

    protected PdfViewerPreferencesImp viewerPreferences

  Contains the Viewer preferences of this PDF document.

### pageLabels

    protected PdfPageLabels pageLabels

### localDestinations

    private TreeMap localDestinations

  Stores the destinations keyed by name. Value is `Object[]{PdfAction,PdfIndirectReference,PdfDestintion}`.

### jsCounter

    int jsCounter

  Stores a list of document level JavaScript actions.

### documentLevelJS

    private HashMap documentLevelJS

### SIXTEEN_DIGITS

    private DecimalFormat SIXTEEN_DIGITS

### documentFileAttachment

    private HashMap documentFileAttachment

### openActionName

    private String openActionName

### openActionAction

    private PdfAction openActionAction

### additionalActions

    private PdfDictionary additionalActions

### collection

    private PdfCollection collection

### annotationsImp

    PdfAnnotationsImp annotationsImp

### markPoint

    protected int markPoint

### nextPageSize

    protected Rectangle nextPageSize

  This is the size of the next page.

### thisBoxSize

    protected HashMap thisBoxSize

  This is the size of the several boxes of the current Page.

### boxSize

    protected HashMap boxSize

  This is the size of the several boxes that will be used in the next page.

### pageEmpty

    private boolean pageEmpty

  This checks if the page is empty.

### duration

    protected int duration

  The duration of the page

### transition

    protected PdfTransition transition

  The page transition

### pageAA

    protected PdfDictionary pageAA

### thumb

    private PdfIndirectReference thumb

### pageResources

    protected PageResources pageResources

  This are the page resources of the current Page.

### strictImageSequence

    private boolean strictImageSequence

  Holds value of property strictImageSequence.

### imageEnd

    private float imageEnd

  This is the position where the image ends.

### imageWait

    private Image imageWait

  This is the image that could not be shown on a previous page.

Constructor Detail

### PdfDocument

    public PdfDocument()

  Constructs a new PDF document.

  Throws:
    `DocumentException` - on error

Method Detail

### addWriter

    public void addWriter(PdfWriter writer)
                   throws DocumentException

  Adds a `PdfWriter` to the `PdfDocument`.

  Parameters:
    `writer` - the `PdfWriter` that writes everything what is added to this document to an outputstream.
  Throws:
    `DocumentException` - on error

### add

    public boolean add(Element element)
                throws DocumentException

  Signals that an `Element` was added to the `Document`.

  Specified by:
    `add` in interface `ElementListener`
  Overrides:
    `add` in class `Document`
  Parameters:
    `element` - the element to add
  Returns:
    `true` if the element was added, `false` if not.
  Throws:
    `DocumentException` - when a document isn't open yet, or has been closed

### open

    public void open()

  Opens the document.

  You have to open the document before you can begin to add content to the body of the document.

  Specified by:
    `open` in interface `DocListener`
  Overrides:
    `open` in class `Document`

### close

    public void close()

  Closes the document. Once all the content has been written in the body, you have to close the body. After that nothing can be written to the body anymore.

  Specified by:
    `close` in interface `DocListener`
  Overrides:
    `close` in class `Document`

### setXmpMetadata

    public void setXmpMetadata(byte[] xmpMetadata)

  Use this method to set the XMP Metadata.

  Parameters:
    `xmpMetadata` - The xmpMetadata to set.

### newPage

    public boolean newPage()

  Makes a new page and sends it to the `PdfWriter`.

  Specified by:
    `newPage` in interface `DocListener`
  Overrides:
    `newPage` in class `Document`
  Returns:
    a `boolean`
  Throws:
    `DocumentException` - on error

### setPageSize

    public boolean setPageSize(Rectangle pageSize)

  Sets the pagesize.

  Specified by:
    `setPageSize` in interface `DocListener`
  Overrides:
    `setPageSize` in class `Document`
  Parameters:
    `pageSize` - the new pagesize
  Returns:
    `true` if the page size was set

### setMargins

    public boolean setMargins(float marginLeft,
                              float marginRight,
                              float marginTop,
                              float marginBottom)

  Sets the margins.

  Specified by:
    `setMargins` in interface `DocListener`
  Overrides:
    `setMargins` in class `Document`
  Parameters:
    `marginLeft` - the margin on the left
    `marginRight` - the margin on the right
    `marginTop` - the margin on the top
    `marginBottom` - the margin on the bottom
  Returns:
    a `boolean`

### setMarginMirroring

    public boolean setMarginMirroring(boolean MarginMirroring)

  Description copied from class: `Document`
  Set the margin mirroring. It will mirror margins for odd/even pages.

  Note: it will not work with `Table`.

  Specified by:
    `setMarginMirroring` in interface `DocListener`
  Overrides:
    `setMarginMirroring` in class `Document`
  Parameters:
    `MarginMirroring` - `true` to mirror the margins
  Returns:
    always `true`
  See Also:
    `DocListener.setMarginMirroring(boolean)`

### setPageCount

    public void setPageCount(int pageN)

  Sets the page number.

  Specified by:
    `setPageCount` in interface `DocListener`
  Overrides:
    `setPageCount` in class `Document`
  Parameters:
    `pageN` - the new page number

### resetPageCount

    public void resetPageCount()

  Sets the page number to 0.

  Specified by:
    `resetPageCount` in interface `DocListener`
  Overrides:
    `resetPageCount` in class `Document`

### setHeader

    public void setHeader(HeaderFooter header)

  Changes the header of this document.

  Specified by:
    `setHeader` in interface `DocListener`
  Overrides:
    `setHeader` in class `Document`
  Parameters:
    `header` - the new header

### resetHeader

    public void resetHeader()

  Resets the header of this document.

  Specified by:
    `resetHeader` in interface `DocListener`
  Overrides:
    `resetHeader` in class `Document`

### setFooter

    public void setFooter(HeaderFooter footer)

  Changes the footer of this document.

  Specified by:
    `setFooter` in interface `DocListener`
  Overrides:
    `setFooter` in class `Document`
  Parameters:
    `footer` - the new footer

### resetFooter

    public void resetFooter()

  Resets the footer of this document.

  Specified by:
    `resetFooter` in interface `DocListener`
  Overrides:
    `resetFooter` in class `Document`

### initPage

    private void initPage()
                   throws DocumentException

  Initializes a page.

  If the footer/header is set, it is printed.

  Throws:
    `DocumentException` - on error

### newLine

    private void newLine()
                  throws DocumentException

  Adds the current line to the list of lines and also adds an empty line.

  Throws:
    `DocumentException` - on error

### carriageReturn

    private void carriageReturn()

  If the current line is not empty or null, it is added to the arraylist of lines and a new empty line is added.

  Throws:
    `DocumentException` - on error

### getVerticalPosition

    public float getVerticalPosition(boolean ensureNewLine)

  Gets the current vertical page position.

  Parameters:
    `ensureNewLine` - Tells whether a new line shall be enforced. This may cause side effects for elements that do not terminate the lines they've started because those lines will get terminated.
  Returns:
    The current vertical page position.

### ensureNewLine

    private void ensureNewLine()

  Ensures that a new line has been started.

### flushLines

    private float flushLines()
                      throws DocumentException

  Writes all the lines to the text-object.

  Returns:
    the displacement that was caused
  Throws:
    `DocumentException` - on error

### writeLineToContent

    void writeLineToContent(PdfLine line,
                            PdfContentByte text,
                            PdfContentByte graphics,
                            Object[] currentValues,
                            float ratio)
                      throws DocumentException

  Writes a text line to the document. It takes care of all the attributes.

  Before entering the line position must have been established and the `text` argument must be in text object scope (`beginText()`).

  Parameters:
    `line` - the line to be written
    `text` - the `PdfContentByte` where the text will be written to
    `graphics` - the `PdfContentByte` where the graphics will be written to
    `currentValues` - the current font and extra spacing values
    `ratio` -
  Throws:
    `DocumentException` - on error

### indentLeft

    private float indentLeft()

  Gets the indentation on the left side.

  Returns:
    a margin

### indentRight

    private float indentRight()

  Gets the indentation on the right side.

  Returns:
    a margin

### indentTop

    private float indentTop()

  Gets the indentation on the top side.

  Returns:
    a margin

### indentBottom

    float indentBottom()

  Gets the indentation on the bottom side.

  Returns:
    a margin

### addSpacing

    private void addSpacing(float extraspace,
                            float oldleading,
                            Font f)

  Adds extra space. This method should probably be rewritten.

### getInfo

    PdfDocument.PdfInfo getInfo()

  Gets the `PdfInfo`-object.

  Returns:
    `PdfInfo`

### getCatalog

    PdfDocument.PdfCatalog getCatalog(PdfIndirectReference pages)

  Gets the `PdfCatalog`-object.

  Parameters:
    `pages` - an indirect reference to this document pages
  Returns:
    `PdfCatalog`

### addOutline

    void addOutline(PdfOutline outline,
                    String name)

  Adds a named outline to the document .

  Parameters:
    `outline` - the outline to be added
    `name` - the name of this local destination

### getRootOutline

    public PdfOutline getRootOutline()

  Gets the root outline. All the outlines must be created with a parent. The first level is created with this outline.

  Returns:
    the root outline

### calculateOutlineCount

    void calculateOutlineCount()

  Updates the count in the outlines.

### traverseOutlineCount

    void traverseOutlineCount(PdfOutline outline)

  Recursive method to update the count in the outlines.

### writeOutlines

    void writeOutlines()
                 throws IOException

  Writes the outline tree to the body of the PDF document.

  Throws:
    `IOException`

### outlineTree

    void outlineTree(PdfOutline outline)
               throws IOException

  Recursive method used to write outlines.

  Throws:
    `IOException`

### setViewerPreferences

    void setViewerPreferences(int preferences)

  See Also:
    `PdfViewerPreferences.setViewerPreferences(int)`

### addViewerPreference

    void addViewerPreference(PdfName key,
                             PdfObject value)

  See Also:
    `PdfViewerPreferences.addViewerPreference(com.lowagie.text.pdf.PdfName, com.lowagie.text.pdf.PdfObject)`

### setPageLabels

    void setPageLabels(PdfPageLabels pageLabels)

  Sets the page labels

  Parameters:
    `pageLabels` - the page labels

### localGoto

    void localGoto(String name,
                   float llx,
                   float lly,
                   float urx,
                   float ury)

  Implements a link to other part of the document. The jump will be made to a local destination with the same name, that must exist.

  Parameters:
    `name` - the name for this link
    `llx` - the lower left x corner of the activation area
    `lly` - the lower left y corner of the activation area
    `urx` - the upper right x corner of the activation area
    `ury` - the upper right y corner of the activation area

### remoteGoto

    void remoteGoto(String filename,
                    String name,
                    float llx,
                    float lly,
                    float urx,
                    float ury)

  Implements a link to another document.

  Parameters:
    `filename` - the filename for the remote document
    `name` - the name to jump to
    `llx` - the lower left x corner of the activation area
    `lly` - the lower left y corner of the activation area
    `urx` - the upper right x corner of the activation area
    `ury` - the upper right y corner of the activation area

### remoteGoto

    void remoteGoto(String filename,
                    int page,
                    float llx,
                    float lly,
                    float urx,
                    float ury)

  Implements a link to another document.

  Parameters:
    `filename` - the filename for the remote document
    `page` - the page to jump to
    `llx` - the lower left x corner of the activation area
    `lly` - the lower left y corner of the activation area
    `urx` - the upper right x corner of the activation area
    `ury` - the upper right y corner of the activation area

### setAction

    void setAction(PdfAction action,
                   float llx,
                   float lly,
                   float urx,
                   float ury)

  Implements an action in an area.

  Parameters:
    `action` - the `PdfAction`
    `llx` - the lower left x corner of the activation area
    `lly` - the lower left y corner of the activation area
    `urx` - the upper right x corner of the activation area
    `ury` - the upper right y corner of the activation area

### getLocalGotoAction

    PdfAction getLocalGotoAction(String name)

### localDestination

    boolean localDestination(String name,
                             PdfDestination destination)

  The local destination to where a local goto with the same name will jump to.

  Parameters:
    `name` - the name of this local destination
    `destination` - the `PdfDestination` with the jump coordinates
  Returns:
    `true` if the local destination was added, `false` if a local destination with the same name already existed

### addJavaScript

    void addJavaScript(PdfAction js)

### addJavaScript

    void addJavaScript(String name,
                       PdfAction js)

### getDocumentLevelJS

    HashMap getDocumentLevelJS()

### addFileAttachment

    void addFileAttachment(String description,
                           PdfFileSpecification fs)
                     throws IOException

  Throws:
    `IOException`

### getDocumentFileAttachment

    HashMap getDocumentFileAttachment()

### setOpenAction

    void setOpenAction(String name)

### setOpenAction

    void setOpenAction(PdfAction action)

### addAdditionalAction

    void addAdditionalAction(PdfName actionType,
                             PdfAction action)

### setCollection

    public void setCollection(PdfCollection collection)

  Sets the collection dictionary.

  Parameters:
    `collection` - a dictionary of type PdfCollection

### getAcroForm

    PdfAcroForm getAcroForm()

  Gets the AcroForm object.

  Returns:
    the PdfAcroform object of the PdfDocument

### setSigFlags

    void setSigFlags(int f)

### addCalculationOrder

    void addCalculationOrder(PdfFormField formField)

### addAnnotation

    void addAnnotation(PdfAnnotation annot)

### getMarkPoint

    int getMarkPoint()

### incMarkPoint

    void incMarkPoint()

### setCropBoxSize

    void setCropBoxSize(Rectangle crop)

### setBoxSize

    void setBoxSize(String boxName,
                    Rectangle size)

### setNewPageSizeAndMargins

    private void setNewPageSizeAndMargins()

### getBoxSize

    Rectangle getBoxSize(String boxName)

  Gives the size of a trim, art, crop or bleed box, or null if not defined.

  Parameters:
    `boxName` - crop, trim, art or bleed

### setPageEmpty

    void setPageEmpty(boolean pageEmpty)

### setDuration

    void setDuration(int seconds)

  Sets the display duration for the page (for presentations)

  Parameters:
    `seconds` - the number of seconds to display the page

### setTransition

    void setTransition(PdfTransition transition)

  Sets the transition for the page

  Parameters:
    `transition` - the PdfTransition object

### setPageAction

    void setPageAction(PdfName actionType,
                       PdfAction action)

### setThumbnail

    void setThumbnail(Image image)
                throws PdfException,
                       DocumentException

  Throws:
    `PdfException`
    `DocumentException`

### getPageResources

    PageResources getPageResources()

### isStrictImageSequence

    boolean isStrictImageSequence()

  Getter for property strictImageSequence.

  Returns:
    Value of property strictImageSequence.

### setStrictImageSequence

    void setStrictImageSequence(boolean strictImageSequence)

  Setter for property strictImageSequence.

  Parameters:
    `strictImageSequence` - New value of property strictImageSequence.

### clearTextWrap

    public void clearTextWrap()

  Method added by Pelikan Stephan

### add

    private void add(Image image)
              throws PdfException,
                     DocumentException

  Adds an image to the document.

  Parameters:
    `image` - the `Image` to add
  Throws:
    `PdfException` - on error
    `DocumentException` - on error

### addPTable

    void addPTable(PdfPTable ptable)
             throws DocumentException

  Adds a `PdfPTable` to the document.

  Parameters:
    `ptable` - the `PdfPTable` to be added to the document.
  Throws:
    `DocumentException` - on error

### fitsPage

    boolean fitsPage(PdfPTable table,
                     float margin)

  Checks if a `PdfPTable` fits the current page of the `PdfDocument`.

  Parameters:
    `table` - the table that has to be checked
    `margin` - a certain margin
  Returns:
    `true` if the `PdfPTable` fits the page, `false` otherwise.

### getPdfTable

    PdfTable getPdfTable(Table table,
                         boolean supportRowAdditions)

  Gets a PdfTable object (contributed by dperezcar@fcc.es)

  Parameters:
    `table` - a high level table object
    `supportRowAdditions` -
  Returns:
    returns a PdfTable object

### add

    private void add(PdfTable table,
                     boolean onlyFirstPage)
              throws DocumentException

  Adds a new table to the document.

  Parameters:
    `table` - Table to add. Rendered rows will be deleted after processing.
    `onlyFirstPage` - Render only the first full page
  Throws:
    `DocumentException`

### analyzeRow

    private void analyzeRow(ArrayList rows,
                            PdfDocument.RenderingContext ctx)

### mayBeRemoved

    private boolean mayBeRemoved(ArrayList row)

### consumeRowspan

    private void consumeRowspan(ArrayList row,
                                PdfDocument.RenderingContext ctx)

### extractRows

    private ArrayList extractRows(ArrayList cells,
                                  PdfDocument.RenderingContext ctx)

### renderCells

    private void renderCells(PdfDocument.RenderingContext ctx,
                             List cells,
                             boolean hasToFit)
                      throws DocumentException

  Throws:
    `DocumentException`

### bottom

    float bottom(Table table)

  Returns the bottomvalue of a `Table` if it were added to this document.

  Parameters:
    `table` - the table that may or may not be added to this document
  Returns:
    a bottom value

### doFooter

    private void doFooter()
                   throws DocumentException

  Throws:
    `DocumentException`

### doHeader

    private void doHeader()
                   throws DocumentException

  Throws:
    `DocumentException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD