An Express server as a PDF factory for CaptoMD medical records, calling 2 separate services:
- CaptoMD-electron-pdf service for building the content of the PDF
- PDFReactor REST service for building the page container, paginated with rigorous conformity
- Install the dependencies if needed
npm install
- Adjust environment variables as needed in
run-local.env
- Start the server by running
npm run start-local
Will download a PDF:
[POST] http://localhost:8080/ with body payload (application/json
):
{
"header": "<header id='running-header-big'>…</header><header id='running-header-small'>…</header><footer>…</footer>",
"content": "<md-emr-print-body>…</md-emr-print-body>",
"title": "",
"lang": "fr|en",
"footer": "Line One<br>DIC : 3-4-4"
}
"header"
and "content"
fields are mandatory.
Note: "footer"
can be a string or an array of strings (max: 2)