https://github.com/backerman/docrenderer
Docker container for rendering XML/XSLT as PDF
https://github.com/backerman/docrenderer
apache-fop clojure docker fop pdf xml xsl-fo xslt
Last synced: 2 months ago
JSON representation
Docker container for rendering XML/XSLT as PDF
- Host: GitHub
- URL: https://github.com/backerman/docrenderer
- Owner: backerman
- License: epl-1.0
- Created: 2017-06-05T00:21:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-03-13T22:46:07.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T05:16:57.143Z (11 months ago)
- Topics: apache-fop, clojure, docker, fop, pdf, xml, xsl-fo, xslt
- Language: Clojure
- Size: 42 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docrenderer
This module accepts XML input and renders it to PDF using a configured
stylesheet.
## Versioning
There's still a bit more work before I'm ready to tag a release, but
if someone else wants to use this image in production, let me know and
I'll tag it anyhow.
## Configuration
Two environment variables must be set if not using the provided
Dockerfile:
* `CONFIG_FILE` is the path of a configuration file; see
`config.sample.toml` for a sample file. (This value defaults to
`/docrenderer/config.toml` in the provided Dockerfile.)
* `STYLESHEETS_DIR` is a directory containing XSL stylesheets. All
stylesheet filenames in `CONFIG_FILE` are relative to this
directory. (This value defaults to `/docrenderer/stylesheets` in the
provided Dockerfile.)
## Custom fonts
To use fonts beyond the Base 14, mount the directory containing the
fonts you wish to use into /usr/local/share/fonts on the host.
## Usage example
N.B.: Docker bind mounts must be specified with their absolute
pathnames.
docker build -t docrenderer:testme .
docker stop docrenderer
docker rm docrenderer
docker run -d \
--mount=type=bind,source=/some/path/config.toml,destination=/docrenderer/config.toml \
--mount=type=bind,source=/some/path/myxsls,destination=/docrenderer/stylesheets \
--mount=type=bind,source=/some/path/myfonts,destination=/usr/local/share/fonts \
--name=docrenderer -p 3000:3000 backerman/docrenderer
## License
Copyright © 2017–9 Brad Ackerman.
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.