iText 5

PdfDocument (1)

PdfDocument Public class

Diagram

flowchart LR classDef interfaceStyle stroke-dasharray: 5 5; classDef abstractStyle stroke-width:4px subgraph iTextSharp.text.pdf iTextSharp.text.pdf.PdfDocument[[PdfDocument]] end subgraph iTextSharp.text iTextSharp.text.Document[[Document]] end iTextSharp.text.Document --> iTextSharp.text.pdf.PdfDocument

Members

Properties

Public properties
Protected internal properties

Type

Name

Methods

float

IndentBottom

get

float

IndentLeft

get

float

IndentRight

get

float

IndentTop

get

Internal properties

Methods

Public methods

Returns

Name

bool

Add

(

IElement

element)

void

AddWriter

(

PdfWriter

writer)

void

ClearTextWrap

()

void

Close

()

IList<

IAccessibleElement

>

EndPage

()

int

GetNextMarkPoint

(object obj)

int

GetStructParentIndex

(object obj)

int``[]

GetStructParentIndexAndNextMarkPoint

(object obj)

float

GetVerticalPosition

(bool ensureNewLine)

bool

NewPage

()

void

Open

()

void

ResetPageCount

()

bool

SetMarginMirroring

(bool MarginMirroring)

bool

SetMarginMirroringTopBottom

(bool MarginMirroringTopBottom)

bool

SetMargins

(float marginLeft, float marginRight, float marginTop, float marginBottom)

bool

SetPageSize

(

Rectangle

pageSize)

Protected methods

Returns

Name

float

CalculateLineHeight

()

void

PopLeading

()

void

PushLeading

()

Protected internal methods

Returns

Name

void

Add

(

Image

image)

void

AddSpacing

(...)

void

CarriageReturn

()

void

EnsureNewLine

()

float

FlushLines

()

void

InitPage

()

void

NewLine

()

void

SetNewPageSizeAndMargins

()

Internal methods

Returns

Name

void

AddAdditionalAction

(

PdfName

actionType,

PdfAction

action)

void

AddAnnotation

(

PdfAnnotation

annot)

void

AddCalculationOrder

(

PdfFormField

formField)

void

AddDiv

(

PdfDiv

div)

void

AddFileAttachment

(string description,

PdfFileSpecification

fs)

void

AddJavaScript

(...)

void

AddOutline

(

PdfOutline

outline, string name)

void

AddPTable

(

PdfPTable

ptable)

void

AddViewerPreference

(

PdfName

key,

PdfObject

value)

void

CalculateOutlineCount

()

bool

FitsPage

(

PdfPTable

table, float margin)

void

FlushFloatingElements

()

Rectangle

GetBoxSize

(string boxName)

PdfCatalog

GetCatalog

(

PdfIndirectReference

pages)

Dictionary<string,

PdfObject

>

GetDocumentFileAttachment

()

Dictionary<string,

PdfObject

>

GetDocumentLevelJS

()

PdfAction

GetLocalGotoAction

(string name)

bool

LocalDestination

(string name,

PdfDestination

destination)

void

LocalGoto

(string name, float llx, float lly, float urx, float ury)

void

OutlineTree

(

PdfOutline

outline)

void

RemoteGoto

(...)

void

SetAction

(

PdfAction

action, float llx, float lly, float urx, float ury)

void

SetBoxSize

(string boxName,

Rectangle

size)

void

SetLanguage

(string language)

void

SetOpenAction

(...)

void

SetPageAction

(

PdfName

actionType,

PdfAction

action)

void

TraverseOutlineCount

(

PdfOutline

outline)

float

WriteLineToContent

(

PdfLine

line,

PdfContentByte

text,

PdfContentByte

graphics, object``[] currentValues, float ratio)

void

WriteOutlines

()

Details

Inheritance

Nested types

Classes
  • PdfInfo

  • PdfCatalog

  • Indentation

  • Destination

Constructors

PdfDocument

Source code

public PdfDocument()

Methods

AddWriter

Source code

public virtual void AddWriter(PdfWriter writer)

Arguments

Type

Name

Description

PdfWriter

writer

PushLeading

Source code

protected virtual void PushLeading()

PopLeading

Source code

protected virtual void PopLeading()

Add [1/2]

Source code

public override bool Add(IElement element)

Arguments

Type

Name

Description

IElement

element

Open

Source code

public override void Open()

Close

Source code

public override void Close()

NewPage

Source code

public override bool NewPage()

EndPage

Source code

public IList<IAccessibleElement> EndPage()

SetPageSize

Source code

public override bool SetPageSize(Rectangle pageSize)

Arguments

Type

Name

Description

Rectangle

pageSize

SetMargins

Source code

public override bool SetMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)

Arguments

Type

Name

Description

float

marginLeft

float

marginRight

float

marginTop

float

marginBottom

SetMarginMirroring

Source code

public override bool SetMarginMirroring(bool MarginMirroring)

Arguments

Type

Name

Description

bool

MarginMirroring

SetMarginMirroringTopBottom

Source code

public override bool SetMarginMirroringTopBottom(bool MarginMirroringTopBottom)

Arguments

Type

Name

Description

bool

MarginMirroringTopBottom

ResetPageCount

Source code

public override void ResetPageCount()

InitPage

Source code

protected internal virtual void InitPage()

NewLine

Source code

protected internal virtual void NewLine()

CalculateLineHeight

Source code

protected virtual float CalculateLineHeight()

CarriageReturn

Source code

protected internal virtual void CarriageReturn()

GetVerticalPosition

Source code

public virtual float GetVerticalPosition(bool ensureNewLine)

Arguments

Type

Name

Description

bool

ensureNewLine

EnsureNewLine

Source code

protected internal virtual void EnsureNewLine()

FlushLines

Source code

protected internal virtual float FlushLines()

WriteLineToContent

Source code

internal float WriteLineToContent(PdfLine line, PdfContentByte text, PdfContentByte graphics, object[] currentValues, float ratio)

Arguments

Type

Name

Description

PdfLine

line

PdfContentByte

text

PdfContentByte

graphics

object``[]

currentValues

float

ratio

AddSpacing [1/2]

Source code

protected internal virtual void AddSpacing(float extraspace, float oldleading, Font f)

Arguments

Type

Name

Description

float

extraspace

float

oldleading

Font

f

AddSpacing [2/2]

Source code

protected internal virtual void AddSpacing(float extraspace, float oldleading, Font f, bool spacingAfter)

Arguments

Type

Name

Description

float

extraspace

float

oldleading

Font

f

bool

spacingAfter

GetCatalog

Source code

internal PdfCatalog GetCatalog(PdfIndirectReference pages)

Arguments

Type

Name

Description

PdfIndirectReference

pages

AddOutline

Source code

internal void AddOutline(PdfOutline outline, string name)

Arguments

Type

Name

Description

PdfOutline

outline

string

name

CalculateOutlineCount

Source code

internal void CalculateOutlineCount()

TraverseOutlineCount

Source code

internal void TraverseOutlineCount(PdfOutline outline)

Arguments

Type

Name

Description

PdfOutline

outline

WriteOutlines

Source code

internal void WriteOutlines()

OutlineTree

Source code

internal void OutlineTree(PdfOutline outline)

Arguments

Type

Name

Description

PdfOutline

outline

AddViewerPreference

Source code

internal void AddViewerPreference(PdfName key, PdfObject value)

Arguments

Type

Name

Description

PdfName

key

PdfObject

value

LocalGoto

Source code

internal void LocalGoto(string name, float llx, float lly, float urx, float ury)

Arguments

Type

Name

Description

string

name

float

llx

float

lly

float

urx

float

ury

RemoteGoto [1/2]

Source code

internal void RemoteGoto(string filename, string name, float llx, float lly, float urx, float ury)

Arguments

Type

Name

Description

string

filename

string

name

float

llx

float

lly

float

urx

float

ury

RemoteGoto [2/2]

Source code

internal void RemoteGoto(string filename, int page, float llx, float lly, float urx, float ury)

Arguments

Type

Name

Description

string

filename

int

page

float

llx

float

lly

float

urx

float

ury

SetAction

Source code

internal void SetAction(PdfAction action, float llx, float lly, float urx, float ury)

Arguments

Type

Name

Description

PdfAction

action

float

llx

float

lly

float

urx

float

ury

GetLocalGotoAction

Source code

internal PdfAction GetLocalGotoAction(string name)

Arguments

Type

Name

Description

string

name

LocalDestination

Source code

internal bool LocalDestination(string name, PdfDestination destination)

Arguments

Type

Name

Description

string

name

PdfDestination

destination

AddJavaScript [1/2]

Source code

internal void AddJavaScript(PdfAction js)

Arguments

Type

Name

Description

PdfAction

js

AddJavaScript [2/2]

Source code

internal void AddJavaScript(string name, PdfAction js)

Arguments

Type

Name

Description

string

name

PdfAction

js

GetDocumentLevelJS

Source code

internal Dictionary<string, PdfObject> GetDocumentLevelJS()

AddFileAttachment

Source code

internal void AddFileAttachment(string description, PdfFileSpecification fs)

Arguments

Type

Name

Description

string

description

PdfFileSpecification

fs

GetDocumentFileAttachment

Source code

internal Dictionary<string, PdfObject> GetDocumentFileAttachment()

SetOpenAction [1/2]

Source code

internal void SetOpenAction(string name)

Arguments

Type

Name

Description

string

name

SetOpenAction [2/2]

Source code

internal void SetOpenAction(PdfAction action)

Arguments

Type

Name

Description

PdfAction

action

AddAdditionalAction

Source code

internal void AddAdditionalAction(PdfName actionType, PdfAction action)

Arguments

Type

Name

Description

PdfName

actionType

PdfAction

action

AddCalculationOrder

Source code

internal void AddCalculationOrder(PdfFormField formField)

Arguments

Type

Name

Description

PdfFormField

formField

AddAnnotation

Source code

internal void AddAnnotation(PdfAnnotation annot)

Arguments

Type

Name

Description

PdfAnnotation

annot

SetLanguage

Source code

internal void SetLanguage(string language)

Arguments

Type

Name

Description

string

language

SetBoxSize

Source code

internal void SetBoxSize(string boxName, Rectangle size)

Arguments

Type

Name

Description

string

boxName

Rectangle

size

SetNewPageSizeAndMargins

Source code

protected internal virtual void SetNewPageSizeAndMargins()

GetBoxSize

Source code

internal Rectangle GetBoxSize(string boxName)

Arguments

Type

Name

Description

string

boxName

SetPageAction

Source code

internal void SetPageAction(PdfName actionType, PdfAction action)

Arguments

Type

Name

Description

PdfName

actionType

PdfAction

action

ClearTextWrap

Source code

public virtual void ClearTextWrap()

GetStructParentIndex

Source code

public virtual int GetStructParentIndex(object obj)

Arguments

Type

Name

Description

object

obj

GetNextMarkPoint

Source code

public virtual int GetNextMarkPoint(object obj)

Arguments

Type

Name

Description

object

obj

GetStructParentIndexAndNextMarkPoint

Source code

public virtual int GetStructParentIndexAndNextMarkPoint(object obj)

Arguments

Type

Name

Description

object

obj

Add [2/2]

Source code

protected internal virtual void Add(Image image)

Arguments

Type

Name

Description

Image

image

AddPTable

Source code

internal void AddPTable(PdfPTable ptable)

Arguments

Type

Name

Description

PdfPTable

ptable

AddDiv

Source code

internal void AddDiv(PdfDiv div)

Arguments

Type

Name

Description

PdfDiv

div

FlushFloatingElements

Source code

internal void FlushFloatingElements()

FitsPage

Source code

internal bool FitsPage(PdfPTable table, float margin)

Arguments

Type

Name

Description

PdfPTable

table

float

margin

Properties

Leading

public virtual float Leading { get; set; }

TabSettings

public virtual TabSettings TabSettings { get; set; }

XmpMetadata

public virtual byte XmpMetadata { set; }

PageCount

public override int PageCount { set; }

IndentLeft

protected internal virtual float IndentLeft { get; }

IndentRight

protected internal virtual float IndentRight { get; }

IndentTop

protected internal virtual float IndentTop { get; }

IndentBottom

protected internal virtual float IndentBottom { get; }

Info

internal PdfInfo Info { get; }

RootOutline

public virtual PdfOutline RootOutline { get; }

ViewerPreferences

internal int ViewerPreferences { set; }

PageLabels

public virtual PdfPageLabels PageLabels { get; internal set; }

Collection

public virtual PdfCollection Collection { set; }

AcroForm

public virtual PdfAcroForm AcroForm { get; }

SigFlags

internal int SigFlags { set; }

CropBoxSize

internal Rectangle CropBoxSize { set; }

PageEmpty

internal bool PageEmpty { get; set; }

Duration

internal int Duration { set; }

Transition

internal PdfTransition Transition { set; }

Thumbnail

internal Image Thumbnail { set; }

PageResources

internal PageResources PageResources { get; }

StrictImageSequence

internal bool StrictImageSequence { get; set; }

Generated with ModularDoc