A comprehensive document export plugin for Bloomreach CMS that enables exporting CMS documents in multiple formats with configurable options.
- JSON - Structured JSON with document properties and metadata
- CSV - Tabular comma-separated values format
- TSV - Tabular tab-separated values format
- XML - Well-formed XML with full document structure
- PDF - Professional PDF documents with configurable page size, orientation, and styling (using Apache FOP)
- HTML - Semantic HTML with optional CSS styling and metadata
Each export format offers format-specific configuration options:
| Format | Options |
|---|---|
| JSON | Pretty-print option |
| CSV | Header row, quoting options |
| TSV | Header row, quoting options |
| XML | Pretty-print, namespace declarations, metadata inclusion |
| Page size (A4/Letter/Legal), orientation (Portrait/Landscape), font size (Small/Medium/Large), metadata toggle | |
| HTML | Include metadata, include CSS styling |
The plugin follows Bloomreach CMS patterns with a 3-layer architecture:
ExportXxxWorkflowinterfaces define the export contractExportXxxWorkflowImplclasses implement the actual export logic- Located in
repository/src/main/java/org/onehippo/forge/exportjson/repository/workflow/
ExportJsonPluginregisters export buttons in the document editor- Dialog classes (
ExportXxxDialog) provide user configuration options - Download pages (
ExportXxxDownloadPage) handle file downloads - Located in
cms/src/main/java/org/onehippo/forge/exportjson/frontend/
- Workflows registered via YAML in
repository/src/main/resources/hcm-config/workflow/exportjson-workflow.yaml - Single plugin handles all export formats
- Bloomreach CMS 16.0.0 or higher
- Java 11+
- Maven 3.6+
mvn clean install-
Deploy the JAR files to your Bloomreach instance:
repository/target/exportjson-repository-*.jar→WEB-INF/lib/cms/target/exportjson-cms-*.jar→WEB-INF/lib/
-
Restart your CMS application
-
Export buttons will appear in the document editor for all configured documents
- Open any document in the Bloomreach CMS editor
- Look for export buttons in the document actions area (JSON, CSV, TSV, XML, PDF, HTML)
- Click the desired export format button
- A dialog will appear with format-specific options
- Configure options as needed
- Click "Download" to save the file
PDF Export:
- Select page size: A4, Letter, or Legal
- Choose orientation: Portrait or Landscape
- Pick font size: Small (9pt), Medium (11pt), Large (13pt)
- Toggle metadata inclusion
HTML Export:
- Include document metadata (created, modified, author)
- Include professional CSS styling
For PDF export using Apache FOP, no additional JVM properties are required. The plugin uses Apache FOP 2.8 which handles font management efficiently.
To add a new export format:
- Create workflow interface:
ExportXxxWorkflow.java - Create workflow implementation:
ExportXxxWorkflowImpl.java - Register in
exportjson-workflow.yaml - Create dialog:
ExportXxxDialog.java,.html,.css - Create download page:
ExportXxxDownloadPage.java - Add to
ExportJsonPlugin.java - Update
ExportJsonPlugin.properties
- jackson-databind (2.15.2) - JSON/XML serialization
- commons-csv (1.10.0) - CSV/TSV handling
- fop (2.8) - PDF generation (Apache FOP)
- hippo-repository-api
- hippo-cms-api
- hippo-addon-workflow
document-export/
├── repository/ # Backend workflow implementations
│ ├── src/main/java/
│ │ └── org/onehippo/forge/exportjson/repository/
│ │ ├── workflow/ # Workflow interfaces and implementations
│ │ └── *Utils.java # Utility classes
│ ├── src/main/resources/
│ │ └── hcm-config/
│ │ └── workflow/ # Workflow YAML configuration
│ └── pom.xml
├── cms/ # Frontend UI and dialogs
│ ├── src/main/java/
│ │ └── org/onehippo/forge/exportjson/frontend/
│ │ ├── dialog/ # Export option dialogs
│ │ ├── pages/ # Download page handlers
│ │ └── plugins/ # Main plugin class
│ └── pom.xml
├── tests/ # Integration tests
├── demo/ # Demo CMS instance
└── pom.xml # Parent POM
mvn clean installmvn clean install -pl repository
mvn clean install -pl cmsmvn clean verifymvn clean site:siteApache License 2.0 - See LICENSE file for details
Contributions are welcome! Please ensure:
- Code follows existing patterns and conventions
- All tests pass:
mvn clean verify - Code is properly commented
- Changes include relevant test coverage
For issues, feature requests, or questions:
- GitHub Issues: https://github.com/bloomreach-forge/document-export/issues
- Bloomreach Forge: https://github.com/bloomreach-forge
- Initial release
- Support for JSON, CSV, TSV, XML exports
- PDF export using Apache FOP
- HTML export with optional CSS styling
- Configurable export options per format
- Multi-page PDF support
- Professional HTML generation with metadata