Docker image for building PDF based on Sphinx reST files in CJK(Chinese, Japanese, Korean) fonts.
982
conf.py.
# Add rst2pdf extension
extensions = ['rst2pdf.pdfbuilder']
# A comma-separated list of each document.
# - index document name(index.rst)
# - filename of the pdf
# - document title, this will show on first page of pdf
# - author name, this also show on first page
pdf_documents = [('index', u'PDF-Filename', u'Document Title', u'Author'),]
# A comma-separated list of custom styles
pdf_stylesheets = ['sphinx', 'kerning', 'a4', 'ko']
# Language to be used for hyphenation support
pdf_language = "ko"
samples/ko.json) to Sphinx's root directory. (Sphinx's conf.py should be located same directory.) docker pull 9bow/sphinx-cjk-pdf:latest
docker run -it -v /somehwere/sphinx/root:/docs 9bow/sphinx-cjk-pdf
_build/pdf/ under Sphinx's document root directory.rootfs/usr/share/fonts. Then, modify language config file (eg. samples/ko.json) to use those fonts.-v /somewhere/fonts/located:/usr/share/fonts. (/somewhere/fonts/located should be replaced.)
docker run -it -v /somehwere/sphinx/root:/docs -v /somewhere/fonts/located:/usr/share/fonts 9bow/sphinx-cjk-pdf
Dockerfile to build new image./bin/bash for installing dependencies once on the container. (not applied on image)
docker run -it -v /somehwere/sphinx/root:/docs 9bow/sphinx /bin/bash
rootfs/usr/share/fonts and add language config.Content type
Image
Digest
Size
3.1 GB
Last updated
over 7 years ago
docker pull 9bow/sphinx-cjk-pdf