mycv.md to mycv.pdf with one of the following command:docker run -i --rm --volume $(pwd):/work --workdir /work yeszao/topdf md2pdf mycv.md
docker run -i --rm --volume $(pwd):/work --workdir /work yeszao/topdf md2pdf mycv.md --theme=/css/cv.css
docker run -i --rm --volume $(pwd):/work --workdir /work yeszao/topdf md2pdf mycv.md --theme=style.css
Where,
yeszao/topdf is the docker image name.md2pdf is the python plugin md2pdf installed in the docker image, we can use it directly.--theme use custom style sheet. You can:
topdf comes with style /css/cv.css,style.css.After naming alias, you can use it like this:
topdf mycv.md
topdf mycv.md --theme=style.css
open ~/.bashrc or ~/.zshrc, add following line:
alias topdf='docker run -i --rm --volume $(pwd):/work --workdir /work yeszao/topdf md2pdf'
alias.bat under %USERPROFILE% folder, content:@doskey topdf=docker run -i --rm --volume $(pwd):/work --workdir /work yeszao/topdf $*
alias.reg, content:Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="%USERPROFILE%\\alias.bat"
alias.reg file, you can now use the topdf command on the CMD:Default, topdf image had included following fonts, you can just use it at your css file:
Arial (Bold, Italic, Bold Italic)Calibri (Bold, Italic, Bold Italic)Times New Roman (Bold, Italic, Bold Italic)Microsoft YaHei (微软雅黑)Hiragino Sans GB (冬青黑体)FZHei-B01S (方正黑体简体)Content type
Image
Digest
Size
166.7 MB
Last updated
about 5 years ago
docker pull yeszao/topdf