Click or drag to resize

Obj Class

Obj is a concrete class for all SDF/Cos objects. Obj hierarchy implements the composite design pattern. As a result, you can invoke a member function of any 'derived' object through Obj interface. If the member function is not supported (e.g. if you invoke Obj::GetNumber() on a boolean object) an Exception will be thrown. You can use GetType() or obl.Is???() member functions to find out type-information at run time, however most of the time the type can be inferred from the PDF specification. Therefore when you call Doc::GetTrailer() you can assume that returned object is a dictionary. If there is any ambiguity use Is???() methods. Objects can't be shared across documents, however you can use Doc::ImportObj() to copy objects from one document to another. Objects can be shared within a document provided that they are created as indirect. Indirect objects are the ones that are referenced in cross-reference table. To create an object as indirect use Doc::CreateIndirect???()(where ? is the Object type).
Inheritance Hierarchy
SystemObject
  pdftron.SDFObj

Namespace:  pdftron.SDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class Obj : IClosable

The Obj type exposes the following members.

Methods
  NameDescription
Public methodClose
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodErase(String)
Removes an element in the dictionary that matches the given key.
Public methodErase(DictIterator)
Removes an element in the dictionary from specified position.
Public methodEraseAt
Checks whether the position is within the Array bounds and then removes it from the Array and moves each subsequent element to the slot with the next smaller index and decrements the Arrays length by 1.
Public methodCode exampleFind
Searches this dictionary for a given key.
Public methodFindObj
Searches this dictionary for a given key.
Public methodGet
Searches this dictionary for a given key and throw an exception if the key is not found.
Public methodGetAsPDFText
Convert the SDF/Cos String object to 'PDF Text String'(a Unicode string). PDF Text Strings are not used to represent page content, however they are used in text annotations, bookmark names, article names, document information etc. These strings are encoded in either PDFDocEncoding or Unicode Character encoding. For more information on PDF Text Strings, please refer to section 3.8.1 'Text Strings' in PDF Reference.
Public methodGetAt
Gets the object from the specified index.
Public methodGetBool
Gets the bool value of this Obj.
Public methodGetBuffer
Gets the buffer of this Obj.
Public methodGetDecodedStream
Gets the decoded stream.
Public methodCode exampleGetDictIterator
Gets the DictIterator used for traversing the items in this Dict Obj.
Public methodGetDoc
Gets the SDFDoc.
Public methodGetGenNum
Gets the generation number.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetName
Gets the name value of this Obj.
Public methodGetNumber
Gets the number value of this Obj.
Public methodGetObjNum
Gets the Obj number.
Public methodGetOffset
Gets the offset of this Obj.
Public methodGetRawBuffer
Gets the buffer.
Public methodGetRawStream
Gets the raw stream.
Public methodGetRawStreamLength
Gets the raw stream length.
Public methodGetType
Gets the Obj type.
Public methodInsert
Inserts an existing Obj in this Array.
Public methodInsertArray
Inserts an ObjType::e_Array object in the Array.
Public methodInsertBool
Inserts an ObjType::e_bool object in the Array.
Public methodInsertDict
Inserts an ObjType::e_dict object in the Array.
Public methodInsertMatrix
Public methodInsertName
Inserts an ObjType::e_name object in the Array.
Public methodInsertNull
Inserts an ObjType::e_null object in the Array.
Public methodInsertNumber
Inserts an ObjType::e_number object in the Array.
Public methodInsertRect
Inserts an Array of 4 numbers in this Array.
Public methodInsertString(Int32, Byte)
Inserts an ObjType::e_string object in the Array.
Public methodInsertString(Int32, String)
Inserts an ObjType::e_string object in the Array.
Public methodInsertText
Inserts an ObjType::e_string object in the Array.
Public methodIsArray
Checks if this Obj is an Array object.
Public methodIsBool
Checks if this Obj is a Bool object.
Public methodIsContainer
Checks if this Obj is a Container object.
Public methodIsDict
Checks if this Obj is a Dictionary object.
Public methodIsEqual
Checks if this Obj is equal to the specified Obj.
Public methodIsFree
Checks if this Obj is free.
Public methodIsIndirect
Checks if this Obj is an Indirect object.
Public methodIsLoaded
Checks if this Obj is loaded in memory.
Public methodIsMarked
Checks if this Obj is marked.
Public methodIsName
Checks if this Obj is a Name object.
Public methodIsNull
Checks if this Obj is a Null object.
Public methodIsNumber
Checks if this Obj is a Number object.
Public methodIsStream
Checks if this Obj is a Stream object.
Public methodIsString
Checks if this Obj is a String object.
Public methodPushBack
Appends an existing Obj at the end of the Array.
Public methodPushBackArray
Appends a new ObjType::e_Array object at the end of the Array.
Public methodPushBackBool
Appends a new ObjType::e_bool object at the end of the Array.
Public methodPushBackDict
Appends a new ObjType::e_dict object at the end of the Array.
Public methodPushBackMatrix
Appends an Array of 6 numbers at the end of the Array.
Public methodPushBackName
Appends a new ObjType::e_name object at the end of the Array.
Public methodPushBackNull
Appends a new ObjType::e_null object at the end of the Array.
Public methodPushBackNumber
Appends a new ObjType::e_number object at the end of the Array.
Public methodPushBackRect
Appends an Array of 4 numbers at the end of the Array.
Public methodPushBackString(Byte)
Appends a new ObjType::e_string object at the end of the Array.
Public methodPushBackString(String)
Appends a new ObjType::e_string object at the end of the Array.
Public methodPushBackText
Appends a new ObjType::e_string object at the end of the Array.
Public methodPut
Inserts a <key, Obj> pair in the dictionary.
Public methodPutArray
Inserts a <key, ObjType::e_Array> pair in the dictionary.
Public methodPutBool
Inserts a <key, ObjType::e_bool> pair in the dictionary.
Public methodPutDict
Inserts a <key, ObjType::e_dict> pair in the dictionary.
Public methodPutMatrix
Inserts a <key, [a,b,c,d,h,v]> pair in the dictionary.
Public methodPutName
Inserts a <key, ObjType::e_name> pair in the dictionary.
Public methodPutNull
Inserts a <key, ObjType::e_null> pair in the dictionary.
Public methodPutNumber
Inserts a <key, ObjType::e_number> pair in the dictionary.
Public methodPutRect
Inserts a <key, [x1,y1,x2,y2]> pair in the dictionary.
Public methodPutString(String, Byte)
Inserts a <key, ObjType::e_string> pair in the dictionary.
Public methodPutString(String, String)
Inserts a <key, ObjType::e_string> pair in the dictionary.
Public methodPutText
Inserts a <key, ObjType::e_string> pair in the dictionary.
Public methodRename
Change the key value of a dictionary entry. The key can't be renamed if another key with the same name already exists in the dictionary. In this case, Rename returns false.
Public methodSetBool
Sets the bool value of this Obj.
Public methodSetMark
Set the object mark. Mark is a boolean value that can be associated with every indirect object. This is especially useful when and object graph should be traversed and an operation should be performed on each node only once.
Public methodSetName
Sets the name value of this Obj.
Public methodSetNumber
Sets the number value of this Obj.
Public methodSetStreamData(Byte)
Sets the stream data of this Obj. This method allows to replacing the content stream with a new one without creating a new object.
Public methodSetStreamData(Byte, IFilter)
Sets the stream data of this Obj. This method allows to replacing the content stream with a new one without creating a new object.
Public methodSetString(Byte)
Sets the string value of this Obj.
Public methodSetString(String)
Sets the string value of this Obj.
Public methodSize
Gets the size of this Obj.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWrite
Writes the Obj to the output stream.
Top
See Also