Convert files from .md to .pdf
1.2K
Convert files from .md to .pdf
To create a container:
docker run --rm -it -v YOUR_WIKI_PROJECT_PATH:/workspace/YOUR_PROJECT_NAME montimage/markdown-to-pdf /bin/bash
Example command:
docker run --rm -it -v /Users/percevio/montimage/mmt-sdk-wiki/:/workspace/mmt-doc montimage/markdown-to-pdf /bin/bash
Note YOUR_WIKI_PROJECT_PATH is the absolutely path of your project in your machine.
Then modify the config.json file with some changes:
input:"YOUR_PROJECT_NAME",
output:"YOUR_PROJECT_NAME/YOUR_OUTPUT_FILE_NAME.pdf"
and some other informations such as: date, ...
Then run the generating application by command:
node app.js config.json
And you can find your .pdf file in YOUR_WIKI_PROJECT_PATH
This is an example of config.json:
{
"opts": {
"cssPath": "./css/mycss.css",
"runningsPath": "./js/runnings.js",
"cwd": "."
},
"input":"mmt-doc"
,
"output": "mmt-doc/mmt-doc.pdf",
"header": {
"text": "MMT-Extract document",
"insertPageNumbers": true
},
"footer": {
"date": "08/07/2015",
"text": "Montimage 2015",
"version": "Ref: 123/456"
}
}
Content type
Image
Digest
sha256:99fd50717…
Size
205.8 MB
Last updated
about 11 years ago
docker pull montimage/markdown-to-pdf