Socket
Socket
Sign inDemoInstall

node-docx-parser

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-docx-parser - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"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();
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc