C# 클래스 iTextSharp.text.Document

A generic Document class.
All kinds of Text-elements can be added to a HTMLDocument. The Document signals all the listeners when an element has been added.

  1. Once a document is created you can add some meta information.
  2. You can also set the headers/footers.
  3. You have to open the document before you can write content.
  4. You can only write content (no more meta-formation!) once a document is opened.
  5. When you change the header/footer on a certain page, this will be effective starting on the next page.
  6. Ater closing the document, every listener (as well as its OutputStream) is closed too.
상속: IDocListener
파일 보기 프로젝트 열기: mapo80/iTextSharp-Monotouch 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Compress bool
WmfFontCorrection float

보호된 프로퍼티들

프로퍼티 타입 설명
chapternumber int
close bool
htmlStyleClass string
javaScript_onLoad string
javaScript_onUnLoad string
listeners List
marginBottom float
marginLeft float
marginMirroring bool
marginMirroringTopBottom bool
marginRight float
marginTop float
open bool
pageN int
pageSize Rectangle

공개 메소드들

메소드 설명
Add ( IElement element ) : bool

Adds an Element to the Document.

AddAuthor ( string author ) : bool

Adds the author to a Document.

AddCreationDate ( ) : bool

Adds the current date and time to a Document.

AddCreator ( string creator ) : bool

Adds the creator to a Document.

AddDocListener ( IDocListener listener ) : void

Adds a IDocListener to the Document.

AddHeader ( string name, string content ) : bool

Adds a user defined header to the document.

AddKeywords ( string keywords ) : bool

Adds the keywords to a Document.

AddProducer ( ) : bool

Adds the producer to a Document.

AddSubject ( string subject ) : bool

Adds the subject to a Document.

AddTitle ( string title ) : bool

Adds the title to a Document.

Close ( ) : void

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.

CloseDocument ( ) : void

Closes the document.

Version for languages that are not case-dependant. 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.

Dispose ( ) : void
Document ( ) : System

Constructs a new Document-object.

Document ( Rectangle pageSize ) : System

Constructs a new Document-object.

Document ( Rectangle pageSize, float marginLeft, float marginRight, float marginTop, float marginBottom ) : System

Constructs a new Document-object.

GetBottom ( float margin ) : float

Returns the lower left y-coordinate, considering a given margin.

GetLeft ( float margin ) : float

Returns the lower left x-coordinate considering a given margin.

GetRight ( float margin ) : float

Returns the upper right x-coordinate, considering a given margin.

GetTop ( float margin ) : float

Returns the upper right y-coordinate, considering a given margin.

IsMarginMirroring ( ) : bool
IsOpen ( ) : bool

Checks if the document is open.

NewPage ( ) : bool

Signals that an new page has to be started.

Open ( ) : void

Opens the document.

Once the document is opened, you can't write any Header- or Meta-information anymore. You have to open the document before you can begin to add content to the body of the document.

OpenDocument ( ) : void

Opens the document.

Version for languages that are not case-dependant. Once the document is opened, you can't write any Header- or Meta-information anymore. You have to open the document before you can begin to add content to the body of the document.

RemoveIDocListener ( IDocListener listener ) : void

Removes a IDocListener from the Document.

ResetPageCount ( ) : void

Sets the page number to 0.

SetMarginMirroring ( bool marginMirroring ) : bool
SetMarginMirroringTopBottom ( bool marginMirroringTopBottom ) : bool
SetMargins ( float marginLeft, float marginRight, float marginTop, float marginBottom ) : bool

Sets the margins.

SetPageSize ( Rectangle pageSize ) : bool

Sets the pagesize.

메소드 상세

Add() 공개 메소드

Adds an Element to the Document.
public Add ( IElement element ) : bool
element IElement the Element to add
리턴 bool

AddAuthor() 공개 메소드

Adds the author to a Document.
public AddAuthor ( string author ) : bool
author string the name of the author
리턴 bool

AddCreationDate() 공개 메소드

Adds the current date and time to a Document.
public AddCreationDate ( ) : bool
리턴 bool

AddCreator() 공개 메소드

Adds the creator to a Document.
public AddCreator ( string creator ) : bool
creator string the name of the creator
리턴 bool

AddDocListener() 공개 메소드

Adds a IDocListener to the Document.
public AddDocListener ( IDocListener listener ) : void
listener IDocListener the new IDocListener
리턴 void

AddHeader() 공개 메소드

Adds a user defined header to the document.
public AddHeader ( string name, string content ) : bool
name string the name of the header
content string the content of the header
리턴 bool

AddKeywords() 공개 메소드

Adds the keywords to a Document.
public AddKeywords ( string keywords ) : bool
keywords string keywords to add
리턴 bool

AddProducer() 공개 메소드

Adds the producer to a Document.
public AddProducer ( ) : bool
리턴 bool

AddSubject() 공개 메소드

Adds the subject to a Document.
public AddSubject ( string subject ) : bool
subject string the subject
리턴 bool

AddTitle() 공개 메소드

Adds the title to a Document.
public AddTitle ( string title ) : bool
title string the title
리턴 bool

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.
public Close ( ) : void
리턴 void

CloseDocument() 공개 메소드

Closes the document.
Version for languages that are not case-dependant. 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.
public CloseDocument ( ) : void
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Document() 공개 메소드

Constructs a new Document-object.
public Document ( ) : System
리턴 System

Document() 공개 메소드

Constructs a new Document-object.
public Document ( Rectangle pageSize ) : System
pageSize Rectangle the pageSize
리턴 System

Document() 공개 메소드

Constructs a new Document-object.
public Document ( Rectangle pageSize, float marginLeft, float marginRight, float marginTop, float marginBottom ) : System
pageSize Rectangle the pageSize
marginLeft float the margin on the left
marginRight float the margin on the right
marginTop float the margin on the top
marginBottom float the margin on the bottom
리턴 System

GetBottom() 공개 메소드

Returns the lower left y-coordinate, considering a given margin.
public GetBottom ( float margin ) : float
margin float a margin
리턴 float

GetLeft() 공개 메소드

Returns the lower left x-coordinate considering a given margin.
public GetLeft ( float margin ) : float
margin float a margin
리턴 float

GetRight() 공개 메소드

Returns the upper right x-coordinate, considering a given margin.
public GetRight ( float margin ) : float
margin float a margin
리턴 float

GetTop() 공개 메소드

Returns the upper right y-coordinate, considering a given margin.
public GetTop ( float margin ) : float
margin float a margin
리턴 float

IsMarginMirroring() 공개 메소드

public IsMarginMirroring ( ) : bool
리턴 bool

IsOpen() 공개 메소드

Checks if the document is open.
public IsOpen ( ) : bool
리턴 bool

NewPage() 공개 메소드

Signals that an new page has to be started.
public NewPage ( ) : bool
리턴 bool

Open() 공개 메소드

Opens the document.
Once the document is opened, you can't write any Header- or Meta-information anymore. You have to open the document before you can begin to add content to the body of the document.
public Open ( ) : void
리턴 void

OpenDocument() 공개 메소드

Opens the document.
Version for languages that are not case-dependant. Once the document is opened, you can't write any Header- or Meta-information anymore. You have to open the document before you can begin to add content to the body of the document.
public OpenDocument ( ) : void
리턴 void

RemoveIDocListener() 공개 메소드

Removes a IDocListener from the Document.
public RemoveIDocListener ( IDocListener listener ) : void
listener IDocListener the IDocListener that has to be removed.
리턴 void

ResetPageCount() 공개 메소드

Sets the page number to 0.
public ResetPageCount ( ) : void
리턴 void

SetMarginMirroring() 공개 메소드

public SetMarginMirroring ( bool marginMirroring ) : bool
marginMirroring bool
리턴 bool

SetMarginMirroringTopBottom() 공개 메소드

public SetMarginMirroringTopBottom ( bool marginMirroringTopBottom ) : bool
marginMirroringTopBottom bool
리턴 bool

SetMargins() 공개 메소드

Sets the margins.
public SetMargins ( float marginLeft, float marginRight, float marginTop, float marginBottom ) : bool
marginLeft float the margin on the left
marginRight float the margin on the right
marginTop float the margin on the top
marginBottom float the margin on the bottom
리턴 bool

SetPageSize() 공개 메소드

Sets the pagesize.
public SetPageSize ( Rectangle pageSize ) : bool
pageSize Rectangle the new pagesize
리턴 bool

프로퍼티 상세

Compress 공개적으로 정적으로 프로퍼티

Allows the pdf documents to be produced without compression for debugging purposes.
public static bool Compress
리턴 bool

WmfFontCorrection 공개적으로 정적으로 프로퍼티

Scales the WMF font size. The default value is 0.86.
public static float WmfFontCorrection
리턴 float

chapternumber 보호되어 있는 프로퍼티

protected int chapternumber
리턴 int

close 보호되어 있는 프로퍼티

Has the document already been closed?
protected bool close
리턴 bool

htmlStyleClass 보호되어 있는 프로퍼티

Style class in HTML body tag
protected string htmlStyleClass
리턴 string

javaScript_onLoad 보호되어 있는 프로퍼티

Content of JavaScript onLoad function
protected string javaScript_onLoad
리턴 string

javaScript_onUnLoad 보호되어 있는 프로퍼티

Content of JavaScript onUnLoad function
protected string javaScript_onUnLoad
리턴 string

listeners 보호되어 있는 프로퍼티

The IDocListener.
protected List listeners
리턴 List

marginBottom 보호되어 있는 프로퍼티

margin in y direction starting from the bottom
protected float marginBottom
리턴 float

marginLeft 보호되어 있는 프로퍼티

margin in x direction starting from the left
protected float marginLeft
리턴 float

marginMirroring 보호되어 있는 프로퍼티

protected bool marginMirroring
리턴 bool

marginMirroringTopBottom 보호되어 있는 프로퍼티

protected bool marginMirroringTopBottom
리턴 bool

marginRight 보호되어 있는 프로퍼티

margin in x direction starting from the right
protected float marginRight
리턴 float

marginTop 보호되어 있는 프로퍼티

margin in y direction starting from the top
protected float marginTop
리턴 float

open 보호되어 있는 프로퍼티

Is the document open or not?
protected bool open
리턴 bool

pageN 보호되어 있는 프로퍼티

Current pagenumber
protected int pageN
리턴 int

pageSize 보호되어 있는 프로퍼티

The size of the page.
protected Rectangle,iTextSharp.text pageSize
리턴 Rectangle