org.apache.fop.render.pdf.extensions

## Class PDFExtensionHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - org.apache.fop.render.pdf.extensions.PDFExtensionHandler

- All Implemented Interfaces:
    ContentHandlerFactory.ObjectSource, ContentHandler, DTDHandler, EntityResolver, ErrorHandler

      public class PDFExtensionHandler
      extends DefaultHandler
      implements ContentHandlerFactory.ObjectSource

  ContentHandler (parser) for restoring PDF extension objects from XML.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.apache.commons.logging.Log` | `log` Logger instance

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDFExtensionHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] data, int start, int length)`
    `void` | `endDocument()`
    `void` | `endElement(String uri, String localName, String qName)`
    `Object` | `getObject()`
    `void` | `setObjectBuiltListener(ContentHandlerFactory.ObjectBuiltListener listener)` Set a listener which gets notified when the object is fully built.
    `void` | `startElement(String uri, String localName, String qName, Attributes attributes)`

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### log

          protected static final org.apache.commons.logging.Log log

      Logger instance

  - ### Constructor Detail

    - #### PDFExtensionHandler

          public PDFExtensionHandler()

  - ### Method Detail

    - #### startElement

          public void startElement(String uri,
                                   String localName,
                                   String qName,
                                   Attributes attributes)
                            throws SAXException

      Specified by:
        `startElement` in interface `ContentHandler`
      Overrides:
        `startElement` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### characters

          public void characters(char[] data,
                                 int start,
                                 int length)
                          throws SAXException

      Specified by:
        `characters` in interface `ContentHandler`
      Overrides:
        `characters` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### endElement

          public void endElement(String uri,
                                 String localName,
                                 String qName)
                          throws SAXException

      Specified by:
        `endElement` in interface `ContentHandler`
      Overrides:
        `endElement` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### endDocument

          public void endDocument()
                           throws SAXException

      Specified by:
        `endDocument` in interface `ContentHandler`
      Overrides:
        `endDocument` in class `DefaultHandler`
      Throws:
        `SAXException`

    - #### getObject

          public Object getObject()

      Specified by:
        `getObject` in interface `ContentHandlerFactory.ObjectSource`
      Returns:
        the object parsed from the SAX stream (call valid after parsing)

    - #### setObjectBuiltListener

          public void setObjectBuiltListener(ContentHandlerFactory.ObjectBuiltListener listener)

      Description copied from interface: `ContentHandlerFactory.ObjectSource`
      Set a listener which gets notified when the object is fully built.
      Specified by:
        `setObjectBuiltListener` in interface `ContentHandlerFactory.ObjectSource`
      Parameters:
        `listener` - the listener which gets notified

Copyright © 2025 Apache Software Foundation. All rights reserved.