Skip to content

piggydoughnut/word2pdf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Original package can be found at https://github.com/VuongVu/word2pdf

I created this fork because I ran into issues when using this package for AWS Lambda, which does not support the newest node version (async/await).

Install package

Run cmd with

npm i word2pdf-promises

or

yarn add word2pdf-promises

Uses

const word2pdf = require('word2pdf-promises');
const fs = require('fs');

Using file path

const convert = () => {
	word2pdf.word2pdf('test.docx')
		.then(data => {
			fs.writeFileSync('test.pdf', data);
		})
}

Using Buffer

const convert = () => {
	word2pdf.word2pdfBuffer(bufferObject)
		.then(data => {
			fs.writeFileSync('test.pdf', data);
		})
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%