1.0.2 • Published 2 years ago

alk-node-pdf-generator v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

"alk-node-pdf-generator"

Follow these steps to generate PDF

  • Step 1 - install the pdf creator package using the following command
    npm i alk-node-pdf-generator
  • Step 2 - Add required packages
    const pdfGenerator = require ('alk-node-pdf-generator')

    
  • Step 3 - Make the xml file and respective xsl file for fo transformation.
  • Step 4 - call generatePdf with xml file path, xsl file path, output file path and file name. All there parameters should valid for the pdf generation

          pdfGenerator.generatePdf('File:\\assessment.xml', 'File:\\Sample.xsl', 'D:\\outputDir',"FileName") .then(function () {
               console.log("pdf generated")
                })
                .catch(function (err) {
                    console.log(err)
                });
  • Step 5 - Add Fop library

  • Step 6 - Run with node environment

     node script.js