Scripture PDF generator based on proskomma-render
npm install proskomma-render-pdfThis project uses proskomma-render to produce HTML suitable for processing by PagedJS, an implementation of CSS Paged Media.
cd proskomma-render-pdf
npm install
`Usage
import {doRender, configIssues} from 'proskomma-render-pdf';doRender takes as arguments
- an instance of Proskomma which has been preloaded with (at least) the necessary documents
- a config object
- optionally, an array of docSetIds to render
- optionally, an array of documentIds to renderSee the scripts for detailed usage.
configIssues(configOb) returns an array of issues found with the config file, including
- badly-formed book names (should be Paratext-style 3-letter, upper case codes)
- section ids with no corresponding entry in the i18n sectionThis function is run within
doRender, but you may wish to check your config before attempting to render.Example Usage
$3
The
make_pdf.js Node script produces PDF directly (in places where puppeteer may be used).`
cd scripts
node ./make_pdf.js config/config_ult.json ~/Desktop/ult_demo.pdf
`The
make_html_pdf.js script produces 'chunked' HTML, which may then be converted to PDF in a web page via the browser's 'save as PDF' feature.`
cd scripts
node ./make_html_for_pdf.js config/config_ult.json ~/Desktop/ult_demo.html
Open this HTML file with a browser
Wait for it to paginate the content
Save as PDF
``from unfoldingWord Literal Text (Psalms and Gospels)