AFPRenderingContext (Apache FOP Core 2.11 API)
Date: 2025-04-24

org.apache.fop.render.afp

## Class AFPRenderingContext

- java.lang.Object
- - org.apache.fop.render.AbstractRenderingContext
  - - org.apache.fop.render.afp.AFPRenderingContext

- All Implemented Interfaces:
    RenderingContext

      public class AFPRenderingContext
      extends AbstractRenderingContext

  Rendering context for AFP (MO:DCA) production.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AFPRenderingContext(FOUserAgent userAgent, AFPResourceManager resourceManager, AFPPaintingState paintingState, FontInfo fontInfo, Map foreignAttributes)` Main constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FontInfo` | `getFontInfo()` Returns the font list.
    `Map` | `getForeignAttributes()` Returns a Map of foreign attributes.
    `String` | `getMimeType()` Returns the MIME type associated with the current output format.
    `AFPPaintingState` | `getPaintingState()`
    `AFPResourceManager` | `getResourceManager()` Returns the resource manager.

    - ### Methods inherited from class org.apache.fop.render.AbstractRenderingContext

      `getHint, getHints, getUserAgent, putHint, putHints`

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

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

- - ### Constructor Detail

    - #### AFPRenderingContext

          public AFPRenderingContext(FOUserAgent userAgent,
                                     AFPResourceManager resourceManager,
                                     AFPPaintingState paintingState,
                                     FontInfo fontInfo,
                                     Map foreignAttributes)

      Main constructor.
      Parameters:
        `userAgent` - the user agent
        `resourceManager` - the resource manager
        `paintingState` - the painting state
        `fontInfo` - the font list
        `foreignAttributes` - a map of foreign attributes

  - ### Method Detail

    - #### getMimeType

          public String getMimeType()

      Returns the MIME type associated with the current output format.
      Returns:
        the MIME type (ex. application/pdf)

    - #### getResourceManager

          public AFPResourceManager getResourceManager()

      Returns the resource manager.
      Returns:
        the resource manager

    - #### getPaintingState

          public AFPPaintingState getPaintingState()

      Returns:
        painting state

    - #### getFontInfo

          public FontInfo getFontInfo()

      Returns the font list.
      Returns:
        the font list

    - #### getForeignAttributes

          public Map getForeignAttributes()

      Returns a Map of foreign attributes.
      Returns:
        the foreign attributes (Map<QName, Object>)

Copyright © 2025 Apache Software Foundation. All rights reserved.