---
Product: Aspose.PDF
Platform: java
Page Type: docs
Canonical URL: https://docs.aspose.org/pdf/java/developer-guide/cos
---

# Pdf Object Model

Work with low-level PDF objects — PdfDictionary, PdfArray, PdfStream — in Aspose.PDF FOSS for Java.

## Overview

The underlying, low-level PDF object model — what the PDF spec itself (ISO 32000-1:2008,
§7.3) calls the COS (Carousel Object System) layer — represents the raw PDF object types
that all high-level PDF structures are built on. Aspose.PDF FOSS for Java exposes this
layer through its own Pdf-prefixed classes (`PdfDictionary`, `PdfArray`, and so on
below), not a COS-prefixed family.

## Core Types

| Class | PDF type |
|-------|----------|
| `PdfDictionary` | Dictionary (`<< >>`) |
| `PdfArray` | Array (`[ ]`) |
| `PdfStream` | Stream with dictionary header |
| `PdfName` | Name object (`/Name`) |
| `PdfString` | String (literal or hex) |
| `PdfInteger` | Integer |
| `PdfBoolean` | Boolean |

## PdfDictionary

`PdfDictionary` maps `PdfName` keys to Pdf object values. Use `set(name, value)` to add
entries and `get(name)` to retrieve them:

```java
PdfDictionary dict = new PdfDictionary();
dict.set(PdfName.of("Author"), new PdfString("Jane Smith"));
PdfString author = (PdfString) dict.get(PdfName.of("Author"));
```

## PdfArray

`PdfArray` holds an ordered list of Pdf objects:

```java
PdfArray array = new PdfArray();
array.add(PdfInteger.valueOf(1));
array.add(PdfInteger.valueOf(2));
int len = array.size(); // 2
```

## Accessing the Document Catalog

The PDF catalog is accessible via `Document.getCatalog()`, which returns a
`PdfDictionary` representing the root catalog object.

## See Also

- [Aspose.PDF for Java — Enterprise Documentation](https://docs.aspose.com/pdf/java/)