# org.pdfclown.documents.Document Class Reference

PDF document [PDF:1.6::3.6.1]. More...

Inheritance diagram for org.pdfclown.documents.Document:

List of all members.

## Classes
class | ConfigurationImpl
| Document configuration. More...
## Public Types
enum | PageLayoutEnum { SinglePage, OneColumn, TwoColumnLeft, TwoColumnRight, TwoPageLeft, TwoPageRight }
| Page layout to be used when the document is opened [PDF:1.6:3.6.1]. More...
enum | PageModeEnum { Simple, Bookmarks, Thumbnails, FullScreen, Layers, Attachments }
| Page mode specifying how the document should be displayed when opened [PDF:1.6:3.6.1]. More...
## Public Member Functions
virtual object | Clone (Document context)
| Gets a clone of the object, registered inside the given document context.
override object | Clone (Document context)
virtual bool | Delete ()
| Removes the object from its document context.
override bool | Equals (object obj)
void | Exclude (PdfObjectWrapper obj)
| Deletes the object from this document context.
void | Exclude< T > (ICollection< T > objs)
| Deletes the objects from this document context.
override int | GetHashCode ()
drawing::SizeF | GetSize ()
| Gets the document size, that is the maximum page dimensions across the whole document.
PdfObjectWrapper | Include (PdfObjectWrapper obj)
| Clones the object within this document context.
ICollection< T > | Include< T > (ICollection< T > objs)
| Clones the collection objects within this document context.
T | ResolveName< T > (PdfDirectObject namedBaseObject)
| Forces a named base object to be expressed as its corresponding high-level representation.
## Static Public Member Functions
static PdfDirectObject | GetBaseObject (PdfObjectWrapper wrapper)
| Gets the PDF object backing the specified wrapper.
static T | Resolve< T > (PdfDirectObject baseObject)
## Protected Member Functions
void | CheckCompatibility (object feature)
| Checks whether the specified feature is compatible with the document's conformance version.
virtual PdfString | RetrieveName ()
| Retrieves the name possibly associated to this object, walking through the document's name dictionary.
PdfDirectObject | RetrieveNamedBaseObject ()
| Retrieves the object name, if available; otherwise, behaves like PdfObjectWrapper.BaseObject.
## Properties
DocumentActions | Actions`[get, set]`
| Gets/Sets the document's behavior in response to trigger events.
Articles | Articles`[get, set]`
| Gets the article threads.
virtual PdfDirectObject | BaseObject`[get, set]`
Bookmarks | Bookmarks`[get, set]`
| Gets/Sets the bookmark collection.
ConfigurationImpl | Configuration`[get, set]`
| Gets/Sets the configuration of this document.
PdfIndirectObject | Container`[get]`
| Gets the indirect object containing the base object.
PdfIndirectObject | DataContainer`[get]`
| Gets the indirect object containing the base data object.
Document | Document`[get]`
| Gets the document context.
File | File`[get]`
| Gets the file context.
Form | Form`[get, set]`
| Gets/Sets the interactive form (AcroForm).
Information | Information`[get, set]`
| Gets/Sets common document metadata.
LayerDefinition | Layer`[get, set]`
| Gets/Sets the optional content properties.
Names | Names`[get, set]`
| Gets/Sets the name dictionary.
PageLabels | PageLabels`[get, set]`
| Gets/Sets the page label ranges.
PageLayoutEnum | PageLayout`[get, set]`
| Gets/Sets the page layout to be used when the document is opened.
PageModeEnum | PageMode`[get, set]`
| Gets/Sets the page mode, that is how the document should be displayed when is opened.
Pages | Pages`[get, set]`
| Gets/Sets the page collection.
drawing::Size | PageSize`[get, set]`
| Gets/Sets the default page size [PDF:1.6:3.6.2].
Resources | Resources`[get, set]`
| Gets/Sets the default resource collection [PDF:1.6:3.6.2].
Version | Version`[get, set]`
| Gets/Sets the version of the PDF specification this document conforms to.
ViewerPreferences | ViewerPreferences`[get, set]`
| Gets the way the document is to be presented.

##

PDF document [PDF:1.6::3.6.1].

## Member Enumeration Documentation

enum org::pdfclown::documents::Document::PageLayoutEnum

Page layout to be used when the document is opened [PDF:1.6:3.6.1].

Enumerator:

  SinglePage | Displays one page at a time.
  OneColumn | Displays the pages in one column.
  TwoColumnLeft | Displays the pages in two columns, with odd-numbered pages on the left.
  TwoColumnRight | Displays the pages in two columns, with odd-numbered pages on the right.
  TwoPageLeft | Displays the pages two at a time, with odd-numbered pages on the left.
  TwoPageRight | Displays the pages two at a time, with odd-numbered pages on the right.

enum org::pdfclown::documents::Document::PageModeEnum

Page mode specifying how the document should be displayed when opened [PDF:1.6:3.6.1].

Enumerator:

  Simple | Neither document outline nor thumbnail images visible.
  Bookmarks | Document outline visible.
  Thumbnails | Thumbnail images visible.
  FullScreen | Full-screen mode, with no menu bar, window controls, or any other window visible.
  Layers | Optional content group panel visible.
  Attachments | Attachments panel visible.

## Member Function Documentation

void org.pdfclown.objects.PdfObjectWrapper.CheckCompatibility | ( | object | feature | ) | `[protected, inherited]`

Checks whether the specified feature is compatible with the document's conformance version.

Parameters:

  | feature | Entity whose compatibility has to be checked. Supported types: VersionEnum Property name resolvable to an annotated getter method MemberInfo

virtual object org.pdfclown.objects.PdfObjectWrapper.Clone | ( | Document | context | ) | `[virtual, inherited]`

Gets a clone of the object, registered inside the given document context.

Parameters:

  | context | Which document the clone has to be registered in.

override object org.pdfclown.documents.Document.Clone | ( | Document | context | ) |

virtual bool org.pdfclown.objects.PdfObjectWrapper.Delete | ( |  | ) | `[virtual, inherited]`

Removes the object from its document context.

The object is no more usable after this method returns.

Returns:
  Whether the object was actually decontextualized (only indirect objects can be decontextualize).

Reimplemented in org.pdfclown.documents.interaction.annotations.Annotation, org.pdfclown.documents.interaction.navigation.page.Article, and org.pdfclown.documents.interaction.navigation.page.ArticleElement.

override bool org.pdfclown.objects.PdfObjectWrapper.Equals | ( | object | obj | ) | `[inherited]`

Reimplemented in org.pdfclown.documents.contents.fonts.Font.

void org.pdfclown.documents.Document.Exclude | ( | PdfObjectWrapper | obj | ) |

Deletes the object from this document context.

References org.pdfclown.objects.PdfObjectWrapper.Delete(), and org.pdfclown.objects.PdfObjectWrapper.File.

Referenced by org.pdfclown.tools.PageManager.Remove().

void org.pdfclown.documents.Document.Exclude< T > | ( | ICollection< T > | objs | ) |

Deletes the objects from this document context.

Type Constraints

  T | : | PdfObjectWrapper |

static PdfDirectObject org.pdfclown.objects.PdfObjectWrapper.GetBaseObject | ( | PdfObjectWrapper< PdfDictionary > | wrapper | ) | `[static, inherited]`

Gets the PDF object backing the specified wrapper.

Parameters:

  | wrapper | Object to extract the base from.

override int org.pdfclown.objects.PdfObjectWrapper.GetHashCode | ( |  | ) | `[inherited]`

Reimplemented in org.pdfclown.documents.contents.fonts.Font.

drawing::SizeF org.pdfclown.documents.Document.GetSize | ( |  | ) |

Gets the document size, that is the maximum page dimensions across the whole document.

See also:
  PageSize

References org.pdfclown.documents.Page.Size.

PdfObjectWrapper org.pdfclown.documents.Document.Include | ( | PdfObjectWrapper | obj | ) |

Clones the object within this document context.

References org.pdfclown.objects.PdfObjectWrapper.Clone(), and org.pdfclown.objects.PdfObjectWrapper.File.

Referenced by org.pdfclown.tools.PageManager.Extract().

ICollection<T> org.pdfclown.documents.Document.Include< T > | ( | ICollection< T > | objs | ) |

Clones the collection objects within this document context.

Type Constraints

  T | : | PdfObjectWrapper |

static T org.pdfclown.documents.Document.Resolve< T > | ( | PdfDirectObject | baseObject | ) | `[static]`

Type Constraints

  T | : | PdfObjectWrapper |

T org.pdfclown.documents.Document.ResolveName< T > | ( | PdfDirectObject | namedBaseObject | ) |

Forces a named base object to be expressed as its corresponding high-level representation.

Type Constraints

  T | : | PdfObjectWrapper |

virtual PdfString org.pdfclown.objects.PdfObjectWrapper.RetrieveName | ( |  | ) | `[protected, virtual, inherited]`

Retrieves the name possibly associated to this object, walking through the document's name dictionary.

Reimplemented in org.pdfclown.documents.multimedia.Rendition.

PdfDirectObject org.pdfclown.objects.PdfObjectWrapper.RetrieveNamedBaseObject | ( |  | ) | `[protected, inherited]`

Retrieves the object name, if available; otherwise, behaves like PdfObjectWrapper.BaseObject.

## Property Documentation

DocumentActions org.pdfclown.documents.Document.Actions`[get, set]`

Gets/Sets the document's behavior in response to trigger events.

Articles org.pdfclown.documents.Document.Articles`[get, set]`

Gets the article threads.

virtual PdfDirectObject org.pdfclown.objects.PdfObjectWrapper.BaseObject`[get, set, inherited]`

Gets the underlying reference object, if available; otherwise, gets the underlying data object.

Bookmarks org.pdfclown.documents.Document.Bookmarks`[get, set]`

Gets/Sets the bookmark collection.

ConfigurationImpl org.pdfclown.documents.Document.Configuration`[get, set]`

Gets/Sets the configuration of this document.

Referenced by org.pdfclown.tokens.Writer.Get().

PdfIndirectObject org.pdfclown.objects.PdfObjectWrapper.Container`[get, inherited]`

Gets the indirect object containing the base object.

PdfIndirectObject org.pdfclown.objects.PdfObjectWrapper.DataContainer`[get, inherited]`

Gets the indirect object containing the base data object.

Document org.pdfclown.objects.PdfObjectWrapper.Document`[get, inherited]`

Gets the document context.

File org.pdfclown.objects.PdfObjectWrapper.File`[get, inherited]`

Gets the file context.

Form org.pdfclown.documents.Document.Form`[get, set]`

Gets/Sets the interactive form (AcroForm).

Information org.pdfclown.documents.Document.Information`[get, set]`

Gets/Sets common document metadata.

Referenced by org.pdfclown.files.FileIdentifier.Update().

LayerDefinition org.pdfclown.documents.Document.Layer`[get, set]`

Gets/Sets the optional content properties.

Referenced by org.pdfclown.documents.contents.layers.Layer.Layer().

Names org.pdfclown.documents.Document.Names`[get, set]`

Gets/Sets the name dictionary.

PageLabels org.pdfclown.documents.Document.PageLabels`[get, set]`

Gets/Sets the page label ranges.

PageLayoutEnum org.pdfclown.documents.Document.PageLayout`[get, set]`

Gets/Sets the page layout to be used when the document is opened.

PageModeEnum org.pdfclown.documents.Document.PageMode`[get, set]`

Gets/Sets the page mode, that is how the document should be displayed when is opened.

Pages org.pdfclown.documents.Document.Pages`[get, set]`

Gets/Sets the page collection.

Referenced by org.pdfclown.tools.PageManager.Add(), org.pdfclown.tools.PageManager.Extract(), org.pdfclown.tools.Renderer.GetPrintDocument(), org.pdfclown.tools.Renderer.Print(), and org.pdfclown.tools.PageManager.Split().

drawing::Size org.pdfclown.documents.Document.PageSize`[get, set]`

Gets/Sets the default page size [PDF:1.6:3.6.2].

Resources org.pdfclown.documents.Document.Resources`[get, set]`

Gets/Sets the default resource collection [PDF:1.6:3.6.2].

The default resource collection is used as last resort by every page that doesn't reference one explicitly (and doesn't reference an intermediate one implicitly).

Version org.pdfclown.documents.Document.Version`[get, set]`

Gets/Sets the version of the PDF specification this document conforms to.

ViewerPreferences org.pdfclown.documents.Document.ViewerPreferences`[get, set]`

Gets the way the document is to be presented.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.