XFINIUM.PDF Documentation
GetCosObjectByNumber Method (PdfFixedDocument)



Xfinium.Pdf Namespace > PdfFixedDocument Class : GetCosObjectByNumber Method
The object number of the specified COS object.
If true then the stream content is also loaded when the object number specifies a stream object. Otherwise only the dictionary part of the stream is loaded.
Gets the specified COS object.
Syntax
'Declaration
 
Public Function GetCosObjectByNumber( _
   ByVal objectNumber As UInteger, _
   Optional ByVal loadStreamContent As Boolean _
) As PdfCosObject
'Usage
 
Dim instance As PdfFixedDocument
Dim objectNumber As UInteger
Dim loadStreamContent As Boolean
Dim value As PdfCosObject
 
value = instance.GetCosObjectByNumber(objectNumber, loadStreamContent)
public PdfCosObject GetCosObjectByNumber( 
   uint objectNumber,
   bool loadStreamContent
)
public:
PdfCosObject^ GetCosObjectByNumber( 
   uint objectNumber,
   bool loadStreamContent
) 

Parameters

objectNumber
The object number of the specified COS object.
loadStreamContent
If true then the stream content is also loaded when the object number specifies a stream object. Otherwise only the dictionary part of the stream is loaded.

Return Value

The COS object if exists, null otherwise.
Remarks
This method should be used with PdfFixedDocument objects created from existing PDF files. For newly created document this method returns null.
Requirements

Supported .NET Platforms: .NET 4.0 and higher, Windows Forms, ASP.NET, Windows Presentation Foundation 4.x, Silverlight 5, WinRT, Universal Windows Platform, Xamarin Mac, iOS & Android, Portable Class Library, .NET Core, .NET Standard


Target Platforms:Windows 10, Windows 8.1, Windows 8 , Windows 7, Windows Vista SP1 or later, Windows Server 2008, Windows Server 2008 R2

See Also

Reference

PdfFixedDocument Class
PdfFixedDocument Members