Skip to content

CaptoMD/CaptoMD-PDFizer

Repository files navigation

Known Vulnerabilities

CaptoMD-PDFizer

An Express server as a PDF factory for CaptoMD medical records, calling 2 separate services:

  1. CaptoMD-electron-pdf service for building the content of the PDF
  2. PDFReactor REST service for building the page container, paginated with rigorous conformity

Getting started

Start locally

  1. Install the dependencies if needed npm install
  2. Adjust environment variables as needed in run-local.env
  3. Start the server by running npm run start-local

Generating a PDF

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)