alk-node-pdf-generator

1.0.2 • Public • Published

"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
    

Readme

Keywords

none

Package Sidebar

Install

npm i alk-node-pdf-generator

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

4.58 kB

Total Files

3

Last publish

Collaborators

  • shehank