| java.lang.Object com.lowagie.text.Document com.lowagie.text.pdf.PdfDocument
Inner Class :public static class Indentation | |
Constructor Summary | |
public | PdfDocument() Constructs a new PDF document. |
Method Summary | |
public boolean | add(Element element) Signals that an Element was added to the Document . | void | addAdditionalAction(PdfName actionType, PdfAction action) | void | addAnnotation(PdfAnnotation annot) | void | addCalculationOrder(PdfFormField formField) | void | addFileAttachment(String description, PdfFileSpecification fs) | void | addJavaScript(PdfAction js) | void | addJavaScript(String name, PdfAction js) | void | addOutline(PdfOutline outline, String name) Adds a named outline to the document . | void | addPTable(PdfPTable ptable) Adds a PdfPTable to the document. | void | addViewerPreference(PdfName key, PdfObject value) | public void | addWriter(PdfWriter writer) Adds a PdfWriter to the PdfDocument . | float | bottom(Table table) Returns the bottomvalue of a Table if it were added to this document. | boolean | breakTableIfDoesntFit(PdfTable table) | void | calculateOutlineCount() Updates the count in the outlines. | public void | clearTextWrap() | public void | close() Closes the document.
Once all the content has been written in the body, you have to close
the body. | boolean | fitsPage(PdfPTable table, float margin) Checks if a PdfPTable fits the current page of the PdfDocument . | PdfAcroForm | getAcroForm() Gets the AcroForm object. | Rectangle | getBoxSize(String boxName) Gives the size of a trim, art, crop or bleed box, or null if not defined. | PdfCatalog | getCatalog(PdfIndirectReference pages) Gets the PdfCatalog -object. | HashMap | getDocumentFileAttachment() | LinkedHashMap | getDocumentLevelJS() | PdfInfo | getInfo() Gets the PdfInfo -object. | PdfAction | getLocalGotoAction(String name) | int | getMarkPoint() | PageResources | getPageResources() | PdfTable | getPdfTable(Table table, boolean supportRowAdditions) | public PdfOutline | getRootOutline() Gets the root outline. | public float | getVerticalPosition(boolean ensureNewLine) Gets the current vertical page position.
Parameters: ensureNewLine - Tells whether a new line shall be enforced. | void | incMarkPoint() | float | indentBottom() Gets the indentation on the bottom side. | boolean | isStrictImageSequence() Getter for property strictImageSequence. | boolean | localDestination(String name, PdfDestination destination) The local destination to where a local goto with the same
name will jump to. | void | localGoto(String name, float llx, float lly, float urx, float ury) Implements a link to other part of the document. | public boolean | newPage() Makes a new page and sends it to the PdfWriter . | public void | open() Opens the document. | void | outlineTree(PdfOutline outline) Recursive method used to write outlines. | void | remoteGoto(String filename, String name, float llx, float lly, float urx, float ury) Implements a link to another document. | void | remoteGoto(String filename, int page, float llx, float lly, float urx, float ury) Implements a link to another document. | public void | resetFooter() Resets the footer of this document. | public void | resetHeader() Resets the header of this document. | public void | resetPageCount() Sets the page number to 0. | void | setAction(PdfAction action, float llx, float lly, float urx, float ury) Implements an action in an area. | void | setBoxSize(String boxName, Rectangle size) | public void | setCollection(PdfCollection collection) Sets the collection dictionary. | void | setCropBoxSize(Rectangle crop) | void | setDuration(int seconds) | public void | setFooter(HeaderFooter footer) Changes the footer of this document. | public void | setHeader(HeaderFooter header) Changes the header of this document. | public boolean | setMarginMirroring(boolean MarginMirroring) | public boolean | setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom) Sets the margins. | void | setOpenAction(String name) | void | setOpenAction(PdfAction action) | void | setPageAction(PdfName actionType, PdfAction action) | public void | setPageCount(int pageN) Sets the page number. | void | setPageEmpty(boolean pageEmpty) | void | setPageLabels(PdfPageLabels pageLabels) | public boolean | setPageSize(Rectangle pageSize) Sets the pagesize. | void | setSigFlags(int f) | void | setStrictImageSequence(boolean strictImageSequence) Setter for property strictImageSequence. | void | setThumbnail(Image image) | void | setTransition(PdfTransition transition) | void | setViewerPreferences(int preferences) | public void | setXmpMetadata(byte[] xmpMetadata) Use this method to set the XMP Metadata. | void | traverseOutlineCount(PdfOutline outline) Recursive method to update the count in the outlines. | void | writeLineToContent(PdfLine line, PdfContentByte text, PdfContentByte graphics, Object currentValues, float ratio) Writes a text line to the document. | void | writeOutlines() Writes the outline tree to the body of the PDF document. |
boxSize | protected HashMap boxSize(Code) | | This is the size of the several boxes that will be used in
the next page.
|
duration | protected int duration(Code) | | The duration of the page
|
hangingPunctuation | final static String hangingPunctuation(Code) | | The characters to be applied the hanging punctuation.
|
indentation | Indentation indentation(Code) | | |
jsCounter | int jsCounter(Code) | | Stores a list of document level JavaScript actions.
|
markPoint | protected int markPoint(Code) | | |
nextMarginBottom | protected float nextMarginBottom(Code) | | margin in y direction starting from the bottom. Will be valid in the next page
|
nextMarginLeft | protected float nextMarginLeft(Code) | | margin in x direction starting from the left. Will be valid in the next page
|
nextMarginRight | protected float nextMarginRight(Code) | | margin in x direction starting from the right. Will be valid in the next page
|
nextMarginTop | protected float nextMarginTop(Code) | | margin in y direction starting from the top. Will be valid in the next page
|
nextPageSize | protected Rectangle nextPageSize(Code) | | This is the size of the next page.
|
pageResources | protected PageResources pageResources(Code) | | This are the page resources of the current Page.
|
thisBoxSize | protected HashMap thisBoxSize(Code) | | This is the size of the several boxes of the current Page.
|
xmpMetadata | protected byte[] xmpMetadata(Code) | | XMP Metadata for the page.
|
add | public boolean add(Element element) throws DocumentException(Code) | | Signals that an Element was added to the Document .
Parameters: element - the element to add true if the element was added, false if not. throws: DocumentException - when a document isn't open yet, or has been closed |
addOutline | void addOutline(PdfOutline outline, String name)(Code) | | Adds a named outline to the document .
Parameters: outline - the outline to be added Parameters: name - the name of this local destination |
addWriter | public void addWriter(PdfWriter writer) throws DocumentException(Code) | | Adds a PdfWriter to the PdfDocument .
Parameters: writer - the PdfWriter that writes everythingwhat is added to this document to an outputstream. throws: DocumentException - on error |
bottom | float bottom(Table table)(Code) | | 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 a bottom value |
calculateOutlineCount | void calculateOutlineCount()(Code) | | Updates the count in the outlines.
|
clearTextWrap | public void clearTextWrap()(Code) | | Method added by Pelikan Stephan
|
close | public void close()(Code) | | 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.
|
fitsPage | boolean fitsPage(PdfPTable table, float margin)(Code) | | Checks if a PdfPTable fits the current page of the PdfDocument .
Parameters: table - the table that has to be checked Parameters: margin - a certain margin true if the PdfPTable fits the page, false otherwise. |
getAcroForm | PdfAcroForm getAcroForm()(Code) | | Gets the AcroForm object.
the PdfAcroform object of the PdfDocument |
getBoxSize | Rectangle getBoxSize(String boxName)(Code) | | Gives the size of a trim, art, crop or bleed box, or null if not defined.
Parameters: boxName - crop, trim, art or bleed |
getCatalog | PdfCatalog getCatalog(PdfIndirectReference pages)(Code) | | Gets the PdfCatalog -object.
Parameters: pages - an indirect reference to this document pages PdfCatalog |
getDocumentFileAttachment | HashMap getDocumentFileAttachment()(Code) | | |
getInfo | PdfInfo getInfo()(Code) | | Gets the PdfInfo -object.
PdfInfo |
getMarkPoint | int getMarkPoint()(Code) | | |
getPdfTable | PdfTable getPdfTable(Table table, boolean supportRowAdditions)(Code) | | Gets a PdfTable object
(contributed by dperezcar@fcc.es)
Parameters: table - a high level table object Parameters: supportRowAdditions - returns a PdfTable object See Also: PdfWriter.getPdfTable(Table) |
getRootOutline | public PdfOutline getRootOutline()(Code) | | Gets the root outline. All the outlines must be created with a parent.
The first level is created with this outline.
the root outline |
getVerticalPosition | public float getVerticalPosition(boolean ensureNewLine)(Code) | | 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 getterminated. The current vertical page position. |
incMarkPoint | void incMarkPoint()(Code) | | |
indentBottom | float indentBottom()(Code) | | Gets the indentation on the bottom side.
a margin |
isStrictImageSequence | boolean isStrictImageSequence()(Code) | | Getter for property strictImageSequence.
Value of property strictImageSequence. |
localDestination | boolean localDestination(String name, PdfDestination destination)(Code) | | The local destination to where a local goto with the same
name will jump to.
Parameters: name - the name of this local destination Parameters: destination - the PdfDestination with the jump coordinates true if the local destination was added,false if a local destination with the same namealready existed |
localGoto | void localGoto(String name, float llx, float lly, float urx, float ury)(Code) | | 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 Parameters: llx - the lower left x corner of the activation area Parameters: lly - the lower left y corner of the activation area Parameters: urx - the upper right x corner of the activation area Parameters: ury - the upper right y corner of the activation area |
newPage | public boolean newPage()(Code) | | Makes a new page and sends it to the PdfWriter .
a boolean throws: DocumentException - on error |
open | public void open()(Code) | | Opens the document.
You have to open the document before you can begin to add content
to the body of the document.
|
remoteGoto | void remoteGoto(String filename, String name, float llx, float lly, float urx, float ury)(Code) | | Implements a link to another document.
Parameters: filename - the filename for the remote document Parameters: name - the name to jump to Parameters: llx - the lower left x corner of the activation area Parameters: lly - the lower left y corner of the activation area Parameters: urx - the upper right x corner of the activation area Parameters: 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)(Code) | | Implements a link to another document.
Parameters: filename - the filename for the remote document Parameters: page - the page to jump to Parameters: llx - the lower left x corner of the activation area Parameters: lly - the lower left y corner of the activation area Parameters: urx - the upper right x corner of the activation area Parameters: ury - the upper right y corner of the activation area |
resetFooter | public void resetFooter()(Code) | | Resets the footer of this document.
|
resetHeader | public void resetHeader()(Code) | | Resets the header of this document.
|
resetPageCount | public void resetPageCount()(Code) | | Sets the page number to 0.
|
setAction | void setAction(PdfAction action, float llx, float lly, float urx, float ury)(Code) | | Implements an action in an area.
Parameters: action - the PdfAction Parameters: llx - the lower left x corner of the activation area Parameters: lly - the lower left y corner of the activation area Parameters: urx - the upper right x corner of the activation area Parameters: ury - the upper right y corner of the activation area |
setCollection | public void setCollection(PdfCollection collection)(Code) | | Sets the collection dictionary.
Parameters: collection - a dictionary of type PdfCollection |
setDuration | void setDuration(int seconds)(Code) | | Sets the display duration for the page (for presentations)
Parameters: seconds - the number of seconds to display the page |
setFooter | public void setFooter(HeaderFooter footer)(Code) | | Changes the footer of this document.
Parameters: footer - the new footer |
setHeader | public void setHeader(HeaderFooter header)(Code) | | Changes the header of this document.
Parameters: header - the new header |
setMargins | public boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)(Code) | | Sets the margins.
Parameters: marginLeft - the margin on the left Parameters: marginRight - the margin on the right Parameters: marginTop - the margin on the top Parameters: marginBottom - the margin on the bottom a boolean |
setPageCount | public void setPageCount(int pageN)(Code) | | Sets the page number.
Parameters: pageN - the new page number |
setPageEmpty | void setPageEmpty(boolean pageEmpty)(Code) | | |
setPageLabels | void setPageLabels(PdfPageLabels pageLabels)(Code) | | Sets the page labels
Parameters: pageLabels - the page labels |
setPageSize | public boolean setPageSize(Rectangle pageSize)(Code) | | Sets the pagesize.
Parameters: pageSize - the new pagesize true if the page size was set |
setSigFlags | void setSigFlags(int f)(Code) | | |
setStrictImageSequence | void setStrictImageSequence(boolean strictImageSequence)(Code) | | Setter for property strictImageSequence.
Parameters: strictImageSequence - New value of property strictImageSequence. |
setTransition | void setTransition(PdfTransition transition)(Code) | | Sets the transition for the page
Parameters: transition - the PdfTransition object |
setXmpMetadata | public void setXmpMetadata(byte[] xmpMetadata)(Code) | | Use this method to set the XMP Metadata.
Parameters: xmpMetadata - The xmpMetadata to set. |
traverseOutlineCount | void traverseOutlineCount(PdfOutline outline)(Code) | | Recursive method to update the count in the outlines.
|
writeLineToContent | void writeLineToContent(PdfLine line, PdfContentByte text, PdfContentByte graphics, Object currentValues, float ratio) throws DocumentException(Code) | | 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 Parameters: text - the PdfContentByte where the text will be written to Parameters: graphics - the PdfContentByte where the graphics will be written to Parameters: currentValues - the current font and extra spacing values Parameters: ratio - throws: DocumentException - on error |
writeOutlines | void writeOutlines() throws IOException(Code) | | Writes the outline tree to the body of the PDF document.
|
|
|