This project is not covered by Drupal’s security advisory policy.
The Output Format API module provides a robust framework for content negotiation and format transformation, enabling seamless conversion of Drupal entity output into multiple formats (e.g., Markdown, PDF). This module is ideal for developers and site builders aiming to deliver diverse content formats to their audience with minimal setup.
Features
The Output Format API offers:
- Standards-Based Format Negotiation: Supports HTTP content negotiation via the
Acceptheader (e.g.,Accept: text/plain) and complies with IANA media type standards. - Flexible Content Transformation: Converts HTML or other entity-rendered outputs into formats like Markdown or PDF.
- Extensible Framework: Allows developers to define custom converters for new formats. Extend the module to support additional formats by implementing the
OutputFormatConverterBaseplugin class. - Entity-Specific Formatting: Generate format-specific representations for individual entities or bundles, enabling granular control.
Use cases include:
- Providing alternative format downloads for articles, reports, or documentation.
- Simplifying workflows for static site generation.
- Enhancing API output compatibility with diverse client applications.
Post-Installation
After installation:
-
Configuration: Visit the module's configuration page under
Admin > Configuration > Output Format API > Manage IANA Media Typesto:- Enable or disable format converters.
- Assign media types to entity types or bundles.
-
IANA Media type formats: Adjust settings for specific media type formats to enable or disable certain converters.
- Entity Links: Check enabled entities for new links in their canonical page menus, offering formatted versions.
Additional Information
- Extensibility: Developers can extend the module to support additional formats by implementing the
OutputFormatConverterBaseplugin class. - Use Case Examples: Generate Markdown documentation, provide PDF invoices, or deliver alternate formats for API consumers.
Project information
- Project categories: Content display, Developer tools, Import and export
- Created by adrianandres on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.


