HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.PdfDocument Class Reference
Inheritance diagram for iTextSharp.text.pdf.PdfDocument:
iTextSharp.text.Document iTextSharp.text.IDocListener iTextSharp.text.IElementListener

Classes

class  Indentation
 
class  PdfCatalog
 
class  PdfInfo
 
class  RenderingContext
 

Public Member Functions

override bool Add (IElement element)
 
override void Open ()
 
override void Close ()
 
override bool NewPage ()
 
override bool SetPageSize (Rectangle pageSize)
 
override bool SetMargins (float marginLeft, float marginRight, float marginTop, float marginBottom)
 
override bool SetMarginMirroring (bool MarginMirroring)
 
override bool SetMarginMirroringTopBottom (bool MarginMirroringTopBottom)
 
override void ResetPageCount ()
 
override void ResetHeader ()
 
override void ResetFooter ()
 
float GetVerticalPosition (bool ensureNewLine)
 
void ClearTextWrap ()
 
- Public Member Functions inherited from iTextSharp.text.Document
 Document ()
 Constructs a new Document-object. More...
 
 Document (Rectangle pageSize)
 Constructs a new Document-object. More...
 
 Document (Rectangle pageSize, float marginLeft, float marginRight, float marginTop, float marginBottom)
 Constructs a new Document-object. More...
 
void AddDocListener (IDocListener listener)
 Adds a IDocListener to the Document. More...
 
void RemoveIDocListener (IDocListener listener)
 Removes a IDocListener from the Document. More...
 
bool AddHeader (string name, string content)
 Adds a user defined header to the document. More...
 
bool AddTitle (string title)
 Adds the title to a Document. More...
 
bool AddSubject (string subject)
 Adds the subject to a Document. More...
 
bool AddKeywords (string keywords)
 Adds the keywords to a Document. More...
 
bool AddAuthor (string author)
 Adds the author to a Document. More...
 
bool AddCreator (string creator)
 Adds the creator to a Document. More...
 
bool AddProducer ()
 Adds the producer to a Document. More...
 
bool AddCreationDate ()
 Adds the current date and time to a Document. More...
 
float GetLeft (float margin)
 Returns the lower left x-coordinate considering a given margin. More...
 
float GetRight (float margin)
 Returns the upper right x-coordinate, considering a given margin. More...
 
float GetTop (float margin)
 Returns the upper right y-coordinate, considering a given margin. More...
 
float GetBottom (float margin)
 Returns the lower left y-coordinate, considering a given margin. More...
 
bool IsOpen ()
 Checks if the document is open. More...
 
bool IsMarginMirroring ()
 

Protected Attributes

bool isSectionTitle = false
 
int leadingCount = 0
 
byte[] xmpMetadata = null
 
float nextMarginLeft
 
float nextMarginRight
 
float nextMarginTop
 
float nextMarginBottom
 
PdfViewerPreferencesImp viewerPreferences = new PdfViewerPreferencesImp()
 
int markPoint
 
Rectangle nextPageSize = null
 
Hashtable thisBoxSize = new Hashtable()
 
Hashtable boxSize = new Hashtable()
 
int duration =-1
 
PdfTransition transition =null
 
PdfDictionary pageAA = null
 
- Protected Attributes inherited from iTextSharp.text.Document
bool open
 summary> Has the document allready been closed? More...
 
bool close
 
Rectangle pageSize
 The size of the page. More...
 
float marginLeft = 0
 summary> margin in x direction starting from the right More...
 
float marginRight = 0
 summary> margin in y direction starting from the top More...
 
float marginTop = 0
 summary> margin in y direction starting from the bottom More...
 
float marginBottom = 0
 
bool marginMirroring = false
 
bool marginMirroringTopBottom = false
 summary> Content of JavaScript onLoad function More...
 
string javaScript_onLoad = null
 summary> Content of JavaScript onUnLoad function More...
 
string javaScript_onUnLoad = null
 summary> Style class in HTML body tag More...
 
string htmlStyleClass = null
 
int pageN = 0
 Current pagenumber More...
 
HeaderFooter header = null
 summary> This is the textual part of the footer More...
 
HeaderFooter footer = null
 
int chapternumber = 0
 

Properties

float Leading [get, set]
 
byte[] XmpMetadata [set]
 
override int PageCount [set]
 
override HeaderFooter Header [set]
 
override HeaderFooter Footer [set]
 
PdfOutline RootOutline [get]
 
PdfCollection Collection [set]
 
PdfAcroForm AcroForm [get]
 
- Properties inherited from iTextSharp.text.Document
virtual HeaderFooter Header [set]
 Changes the header of this document. More...
 
virtual HeaderFooter Footer [set]
 Changes the footer of this document. More...
 
virtual int PageCount [set]
 Sets the page number. More...
 
int PageNumber [get]
 Returns the current page number. More...
 
float LeftMargin [get]
 Returns the left margin. More...
 
float RightMargin [get]
 Return the right margin. More...
 
float TopMargin [get]
 Returns the top margin. More...
 
float BottomMargin [get]
 Returns the bottom margin. More...
 
float Left [get]
 Returns the lower left x-coordinate. More...
 
float Right [get]
 Returns the upper right x-coordinate. More...
 
float Top [get]
 Returns the upper right y-coordinate. More...
 
float Bottom [get]
 Returns the lower left y-coordinate. More...
 
Rectangle PageSize [get]
 Gets the pagesize. More...
 
static String Product [get]
 
static String Release [get]
 
static string Version [get]
 Gets the iText version. More...
 
string JavaScript_onLoad [get, set]
 Gets the JavaScript onLoad command. More...
 
string JavaScript_onUnLoad [get, set]
 Gets the JavaScript onUnLoad command. More...
 
string HtmlStyleClass [get, set]
 Gets the style class of the HTML body tag More...
 
- Properties inherited from iTextSharp.text.IDocListener
int PageCount [set]
 Sets the page number. More...
 
HeaderFooter Header [set]
 Changes the header of this document. More...
 
HeaderFooter Footer [set]
 Changes the footer of this document. More...
 

Additional Inherited Members

- Static Public Attributes inherited from iTextSharp.text.Document
static bool Compress = true
 summary> Scales the WMF font size. The default value is 0.86. More...
 
static float WmfFontCorrection = 0.86f
 summary> The IDocListener. More...
 

Detailed Description

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
com.lowagie.text.Document
com.lowagie.text.DocListener
PdfWriter

Member Function Documentation

◆ Add()

override bool iTextSharp.text.pdf.PdfDocument.Add ( IElement  element)
virtual

Signals that an Element was added to the Document.

Parameters
elementthe element to add
Returns
true if the element was added, false if not.
Exceptions
DocumentExceptionwhen a document isn't open yet, or has been closed

Reimplemented from iTextSharp.text.Document.

◆ ClearTextWrap()

void iTextSharp.text.pdf.PdfDocument.ClearTextWrap ( )

Method added by Pelikan Stephan

See also
com.lowagie.text.DocListener::clearTextWrap()

◆ Close()

override void iTextSharp.text.pdf.PdfDocument.Close ( )
virtual

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.

Reimplemented from iTextSharp.text.Document.

◆ GetVerticalPosition()

float iTextSharp.text.pdf.PdfDocument.GetVerticalPosition ( bool  ensureNewLine)

Gets the current vertical page position.

Parameters
ensureNewLineTells 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.

◆ NewPage()

override bool iTextSharp.text.pdf.PdfDocument.NewPage ( )
virtual

Makes a new page and sends it to the PdfWriter.

Returns
a bool
Exceptions
DocumentExceptionon error

Reimplemented from iTextSharp.text.Document.

◆ Open()

override void iTextSharp.text.pdf.PdfDocument.Open ( )
virtual

Opens the document.

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

Reimplemented from iTextSharp.text.Document.

◆ ResetFooter()

override void iTextSharp.text.pdf.PdfDocument.ResetFooter ( )
virtual

Resets the footer of this document.

Reimplemented from iTextSharp.text.Document.

◆ ResetHeader()

override void iTextSharp.text.pdf.PdfDocument.ResetHeader ( )
virtual

Resets the header of this document.

Reimplemented from iTextSharp.text.Document.

◆ ResetPageCount()

override void iTextSharp.text.pdf.PdfDocument.ResetPageCount ( )
virtual

Sets the page number to 0.

Reimplemented from iTextSharp.text.Document.

◆ SetMarginMirroring()

override bool iTextSharp.text.pdf.PdfDocument.SetMarginMirroring ( bool  MarginMirroring)
virtual
See also
com.lowagie.text.DocListener::setMarginMirroring(bool)

Reimplemented from iTextSharp.text.Document.

◆ SetMarginMirroringTopBottom()

override bool iTextSharp.text.pdf.PdfDocument.SetMarginMirroringTopBottom ( bool  MarginMirroringTopBottom)
virtual
See also
com.lowagie.text.DocListener::setMarginMirroring(boolean)
Since
2.1.6

Reimplemented from iTextSharp.text.Document.

◆ SetMargins()

override bool iTextSharp.text.pdf.PdfDocument.SetMargins ( float  marginLeft,
float  marginRight,
float  marginTop,
float  marginBottom 
)
virtual

Sets the margins.

Parameters
marginLeftthe margin on the left
marginRightthe margin on the right
marginTopthe margin on the top
marginBottomthe margin on the bottom
Returns
a bool

Reimplemented from iTextSharp.text.Document.

◆ SetPageSize()

override bool iTextSharp.text.pdf.PdfDocument.SetPageSize ( Rectangle  pageSize)
virtual

Sets the pagesize.

Parameters
pageSizethe new pagesize
Returns
true if the page size was set

Reimplemented from iTextSharp.text.Document.

Member Data Documentation

◆ boxSize

Hashtable iTextSharp.text.pdf.PdfDocument.boxSize = new Hashtable()
protected

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

◆ duration

int iTextSharp.text.pdf.PdfDocument.duration =-1
protected

The duration of the page

◆ isSectionTitle

bool iTextSharp.text.pdf.PdfDocument.isSectionTitle = false
protected

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

Since
2.1.2

◆ leadingCount

int iTextSharp.text.pdf.PdfDocument.leadingCount = 0
protected

Signals that the current leading has to be subtracted from a YMark object.

Since
2.1.2

◆ markPoint

int iTextSharp.text.pdf.PdfDocument.markPoint
protected

◆ nextMarginBottom

float iTextSharp.text.pdf.PdfDocument.nextMarginBottom
protected

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

◆ nextMarginLeft

float iTextSharp.text.pdf.PdfDocument.nextMarginLeft
protected

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

◆ nextMarginRight

float iTextSharp.text.pdf.PdfDocument.nextMarginRight
protected

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

◆ nextMarginTop

float iTextSharp.text.pdf.PdfDocument.nextMarginTop
protected

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

◆ nextPageSize

Rectangle iTextSharp.text.pdf.PdfDocument.nextPageSize = null
protected

This is the size of the next page.

◆ pageAA

PdfDictionary iTextSharp.text.pdf.PdfDocument.pageAA = null
protected

◆ thisBoxSize

Hashtable iTextSharp.text.pdf.PdfDocument.thisBoxSize = new Hashtable()
protected

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

◆ transition

PdfTransition iTextSharp.text.pdf.PdfDocument.transition =null
protected

The page transition

◆ viewerPreferences

PdfViewerPreferencesImp iTextSharp.text.pdf.PdfDocument.viewerPreferences = new PdfViewerPreferencesImp()
protected

Contains the Viewer preferences of this PDF document.

◆ xmpMetadata

byte [] iTextSharp.text.pdf.PdfDocument.xmpMetadata = null
protected

XMP Metadata for the page.

Property Documentation

◆ AcroForm

PdfAcroForm iTextSharp.text.pdf.PdfDocument.AcroForm
get

Gets the AcroForm object.

Returns
the PdfAcroform object of the PdfDocument

◆ Collection

PdfCollection iTextSharp.text.pdf.PdfDocument.Collection
set

Sets the collection dictionary.

Parameters
collectiona dictionary of type PdfCollection

◆ Footer

override HeaderFooter iTextSharp.text.pdf.PdfDocument.Footer
set

Changes the footer of this document.

Parameters
footerthe new footer

◆ Header

override HeaderFooter iTextSharp.text.pdf.PdfDocument.Header
set

Changes the header of this document.

Parameters
headerthe new header

◆ Leading

float iTextSharp.text.pdf.PdfDocument.Leading
getset

Getter for the current leading.

Returns
the current leading
Since
2.1.2

◆ PageCount

override int iTextSharp.text.pdf.PdfDocument.PageCount
set

Sets the page number.

Parameters
pageNthe new page number

◆ RootOutline

PdfOutline iTextSharp.text.pdf.PdfDocument.RootOutline
get

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

◆ XmpMetadata

byte [] iTextSharp.text.pdf.PdfDocument.XmpMetadata
set

Use this method to set the XMP Metadata.

Parameters
xmpMetadataThe xmpMetadata to set.

The documentation for this class was generated from the following file: