# Class pyglet.text.DocumentDecoder

Known Subclasses:
  formats.structured.StructuredTextDecoder, formats.plaintext.PlainTextDecoder, formats.attributed.AttributedTextDecoder

Abstract document decoder.

## Methods

AbstractDocument | decode(self, text, location=None) Decode document text.

## Method Details

### decode

decode(self, text, location=None)
Decode document text.

Parameters:
  text : str
    Text to decode
  location : Location
    Location to use as base path for additional resources referenced within the document (for example, HTML images).
Returns: AbstractDocument