HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.PdfObject Class Reference
Inheritance diagram for iTextSharp.text.pdf.PdfObject:
iTextSharp.text.pdf.PdfArray iTextSharp.text.pdf.PdfBoolean iTextSharp.text.pdf.PdfDictionary iTextSharp.text.pdf.PdfIndirectReference iTextSharp.text.pdf.PdfLiteral iTextSharp.text.pdf.PdfName iTextSharp.text.pdf.PdfNull iTextSharp.text.pdf.PdfNumber iTextSharp.text.pdf.PdfString

Public Member Functions

virtual void ToPdf (PdfWriter writer, Stream os)
 
virtual byte[] GetBytes ()
 
bool CanBeInObjStm ()
 
override string ToString ()
 
bool IsNull ()
 
bool IsBoolean ()
 
bool IsNumber ()
 
bool IsString ()
 
bool IsName ()
 
bool IsArray ()
 
bool IsDictionary ()
 
bool IsStream ()
 
bool IsIndirect ()
 

Static Public Attributes

const int BOOLEAN = 1
 
const int NUMBER = 2
 
const int STRING = 3
 
const int NAME = 4
 
const int ARRAY = 5
 
const int DICTIONARY = 6
 
const int STREAM = 7
 
const int NULL = 8
 
const int INDIRECT = 10
 
const string NOTHING = ""
 
const string TEXT_PDFDOCENCODING = "PDF"
 
const string TEXT_UNICODE = "UnicodeBig"
 

Protected Member Functions

 PdfObject (int type)
 
 PdfObject (int type, string content)
 
 PdfObject (int type, byte[] bytes)
 

Protected Attributes

byte[] bytes
 
int type
 
PRIndirectReference indRef
 

Properties

int Length [get]
 
string Content [set]
 
int Type [get]
 
PRIndirectReference IndRef [get, set]
 

Detailed Description

<CODE>PdfObject</CODE> is the abstract baseclass of all PDF objects.

PDF supports seven basic types of objects: bools, numbers, strings, names, arrays, dictionaries and streams. In addition, PDF provides a null object. Objects may be labeled so that they can be referred to by other objects.
All these basic PDF objects are described in the 'Portable Document Format Reference Manual version 1.3' Chapter 4 (pages 37-54).

See also
PdfNull
Pdfbool
PdfNumber
PdfString
PdfName
PdfArray
PdfDictionary
PdfStream
PdfIndirectReference

Constructor & Destructor Documentation

◆ PdfObject() [1/3]

iTextSharp.text.pdf.PdfObject.PdfObject ( int  type)
protected

Constructs a PdfObject of a certain type without any content.

Parameters
typetype of the new PdfObject

◆ PdfObject() [2/3]

iTextSharp.text.pdf.PdfObject.PdfObject ( int  type,
string  content 
)
protected

Constructs a PdfObject of a certain type with a certain content.

Parameters
typetype of the new PdfObject
contentcontent of the new PdfObject as a String.

◆ PdfObject() [3/3]

iTextSharp.text.pdf.PdfObject.PdfObject ( int  type,
byte[]  bytes 
)
protected

Constructs a PdfObject of a certain type with a certain content.

Parameters
typetype of the new PdfObject
bytescontent of the new PdfObject as an array of byte.

Member Function Documentation

◆ CanBeInObjStm()

bool iTextSharp.text.pdf.PdfObject.CanBeInObjStm ( )

Can this object be in an object stream?

Returns
true if this object can be in an object stream.

◆ GetBytes()

virtual byte [] iTextSharp.text.pdf.PdfObject.GetBytes ( )
virtual

Gets the presentation of this object in a byte array

Returns
a byte array

Reimplemented in iTextSharp.text.pdf.PRStream, and iTextSharp.text.pdf.PdfString.

◆ IsArray()

bool iTextSharp.text.pdf.PdfObject.IsArray ( )

Checks if this PdfObject is of the type PdfArray.

Returns
true or false

◆ IsBoolean()

bool iTextSharp.text.pdf.PdfObject.IsBoolean ( )

Checks if this PdfObject is of the type PdfBoolean.

Returns
true or false

◆ IsDictionary()

bool iTextSharp.text.pdf.PdfObject.IsDictionary ( )

Checks if this PdfObject is of the type PdfDictionary.

Returns
true or false

◆ IsIndirect()

bool iTextSharp.text.pdf.PdfObject.IsIndirect ( )

Checks if this is an indirect object.

Returns
true if this is an indirect object

◆ IsName()

bool iTextSharp.text.pdf.PdfObject.IsName ( )

Checks if this PdfObject is of the type PdfName.

Returns
true or false

◆ IsNull()

bool iTextSharp.text.pdf.PdfObject.IsNull ( )

Checks if this PdfObject is of the type PdfNull.

Returns
true or false

◆ IsNumber()

bool iTextSharp.text.pdf.PdfObject.IsNumber ( )

Checks if this PdfObject is of the type PdfNumber.

Returns
true or false

◆ IsStream()

bool iTextSharp.text.pdf.PdfObject.IsStream ( )

Checks if this PdfObject is of the type PdfStream.

Returns
true or false

◆ IsString()

bool iTextSharp.text.pdf.PdfObject.IsString ( )

Checks if this PdfObject is of the type PdfString.

Returns
true or false

◆ ToPdf()

virtual void iTextSharp.text.pdf.PdfObject.ToPdf ( PdfWriter  writer,
Stream  os 
)
virtual

Writes the PDF representation of this PdfObject as an array of bytes to the writer.

Parameters
writerfor backwards compatibility
osthe outputstream to write the bytes to.
Exceptions
IOException

Reimplemented in iTextSharp.text.pdf.PRStream, iTextSharp.text.pdf.PRIndirectReference, iTextSharp.text.pdf.PdfString, iTextSharp.text.pdf.PdfStream, iTextSharp.text.pdf.PdfOutline, iTextSharp.text.pdf.PdfLiteral, iTextSharp.text.pdf.PdfEFStream, iTextSharp.text.pdf.PdfDictionary, iTextSharp.text.pdf.PdfDashPattern, and iTextSharp.text.pdf.PdfArray.

◆ ToString()

override string iTextSharp.text.pdf.PdfObject.ToString ( )

Returns the length of the PDF representation of the PdfObject.

In some cases, namely for PdfString and PdfStream, this method differs from the method length because length returns the length of the actual content of the PdfObject.

Remark: the actual content of an object is in most cases identical to its representation. The following statement is always true: Length() >= PdfLength().

Returns
a length Returns the String-representation of this PdfObject.
a String

Member Data Documentation

◆ ARRAY

const int iTextSharp.text.pdf.PdfObject.ARRAY = 5
static

a possible type of PdfObject

◆ BOOLEAN

const int iTextSharp.text.pdf.PdfObject.BOOLEAN = 1
static

a possible type of PdfObject

◆ bytes

byte [] iTextSharp.text.pdf.PdfObject.bytes
protected

the content of this PdfObject

◆ DICTIONARY

const int iTextSharp.text.pdf.PdfObject.DICTIONARY = 6
static

a possible type of PdfObject

◆ INDIRECT

const int iTextSharp.text.pdf.PdfObject.INDIRECT = 10
static

a possible type of PdfObject

◆ indRef

PRIndirectReference iTextSharp.text.pdf.PdfObject.indRef
protected

Holds value of property indRef.

◆ NAME

const int iTextSharp.text.pdf.PdfObject.NAME = 4
static

a possible type of PdfObject

◆ NOTHING

const string iTextSharp.text.pdf.PdfObject.NOTHING = ""
static

This is an empty string used for the PdfNull-object and for an empty PdfString-object.

◆ NULL

const int iTextSharp.text.pdf.PdfObject.NULL = 8
static

a possible type of PdfObject

◆ NUMBER

const int iTextSharp.text.pdf.PdfObject.NUMBER = 2
static

a possible type of PdfObject

◆ STREAM

const int iTextSharp.text.pdf.PdfObject.STREAM = 7
static

a possible type of PdfObject

◆ STRING

const int iTextSharp.text.pdf.PdfObject.STRING = 3
static

a possible type of PdfObject

◆ TEXT_PDFDOCENCODING

const string iTextSharp.text.pdf.PdfObject.TEXT_PDFDOCENCODING = "PDF"
static

This is the default encoding to be used for converting strings into bytes and vice versa. The default encoding is PdfDocEcoding.

◆ TEXT_UNICODE

const string iTextSharp.text.pdf.PdfObject.TEXT_UNICODE = "UnicodeBig"
static

This is the encoding to be used to output text in Unicode.

◆ type

int iTextSharp.text.pdf.PdfObject.type
protected

the type of this PdfObject

Property Documentation

◆ Content

string iTextSharp.text.pdf.PdfObject.Content
setprotected

Changes the content of this PdfObject.

Parameters
contentthe new content of this PdfObject

◆ IndRef

PRIndirectReference iTextSharp.text.pdf.PdfObject.IndRef
getset

◆ Length

int iTextSharp.text.pdf.PdfObject.Length
get

Returns the length of the actual content of the PdfObject.

In some cases, namely for PdfString and PdfStream, this method differs from the method pdfLength because pdfLength returns the length of the PDF representation of the object, not of the actual content as does the method length.

Remark: the actual content of an object is in some cases identical to its representation. The following statement is always true: Length() >= PdfLength().

Returns
a length

◆ Type

int iTextSharp.text.pdf.PdfObject.Type
get

Returns the type of this PdfObject.

Returns
a type

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