Class ContentResource
Describes a single resource entry in a content stream's /Resources dictionary (spec §7.8.3, Table 33). Resources include fonts, images, forms, patterns, shadings, and extended graphics states.
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public sealed class ContentResource
Constructors
ContentResource(string, string, int, string?)
Initializes a content resource descriptor.
Declaration
public ContentResource(string category, string key, int objectNumber, string? typeName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | category | |
| string | key | |
| int | objectNumber | |
| string | typeName |
Properties
Category
Gets the resource category (e.g. "Font", "XObject", "ExtGState", "Shading", "Pattern").
Declaration
public string Category { get; }
Property Value
| Type | Description |
|---|---|
| string |
Key
Gets the resource key name within the category dictionary (e.g. "F1", "Im1", "GS1").
Declaration
public string Key { get; }
Property Value
| Type | Description |
|---|---|
| string |
ObjectNumber
Gets the indirect object number of the resource, or 0 if not yet serialized.
Declaration
public int ObjectNumber { get; }
Property Value
| Type | Description |
|---|---|
| int |
TypeName
Gets the resource type name from the object's /Type entry, if available.
Declaration
public string? TypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the current object. |