node-docx-parser
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "node-docx-parser", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A node script which can fill DOCX placeholders and convert to PDFs", | ||
@@ -5,0 +5,0 @@ "bin": { |
# Node Docx Parser | ||
This package allows you to parse DOCX files with an easy to use API. It allows you to fill placeholders within DOCX files. You can also choose to save the file as a DOCX or as a PDF. |
@@ -0,0 +0,0 @@ class ArgumentResolver { |
@@ -24,4 +24,3 @@ const ArgumentResolver = require("./ArgumentResolver"); | ||
convertToPdf() { | ||
let newFileName = ArgumentResolver.outputFileName().replace("docx", "pdf"); | ||
exec(`/usr/bin/unoconv -f pdf ${ArgumentResolver.outputFileName()} -o ${newFileName}`); | ||
exec(`/usr/bin/unoconv -f pdf "${ArgumentResolver.outputFileName()}"`); | ||
} | ||
@@ -28,0 +27,0 @@ |
@@ -31,2 +31,4 @@ #!/usr/bin/env node | ||
try { | ||
console.log('Rendering docx'); | ||
document.render() | ||
@@ -46,6 +48,10 @@ } | ||
console.log('Saving docx'); | ||
FilesystemService.saveDocxFile(document.getZip().generate({ type: 'nodebuffer' })); | ||
if (ArgumentResolver.wantsPdf()) { | ||
console.log('Converting to pdf'); | ||
FilesystemService.convertToPdf(); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103
3812