This is an external module to generate a PDF when prompted using the JSPDF library.
For engineering context and maintenance notes, start with onboarding.md.
- Clone repo into the
modulesdirectory for aREDCapinstance. - Modify name to follow REDCap EM naming conventions:
wellu_pdf_generator_v[version_number] chownthegenerated_pdfsdirectory to be owned the appropriate user. During local development this is most likely not needed.- Enable EM for the REDCap instance an project.
PDFGenerator.php: Main PHP class that handles logic for the EM. Contains goals with their priority level, label, image names, etc. Sorts and processes goals before passing them to theconfig.jsfile to be rendered into a PDFjs/: Contains Javascript code, fonts, and images for the PDF -js/config.js: Javascript code to render the PDF. Uses jsPDF and has a lot of self defined helper functions. -js/img/: Directory with images/icons.resources/: Has resources, copy, and a lookup table based on study team logic. -lookup.json: Header for the extended "narrative section" of the PDF. After the first page. -resources/resources.json: JSONifed version of the PDF copy from the spreadsheet provided by the study team. -resources/resources.old.json: Probably should deleteemLoggerTrait.php: EM Logger Class. Docsprocess_resources.py: Python script to process Excel sheet with PDF copy from study team. Please see confluence documentation.pages/pdfgenerator.php: Page for testing project