1.2.5 • Published 3 years ago

convert-multiple-files v1.2.5

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

Convert multiple files

File converter for various types, tested on linux and windows.

Supported file types

Accepted file formatsOutput
docdocx
docpdf
docodt
docxdoc
docxodt
docxpdf
odtdoc
odtdocx
odtpdf
docxhtml
allbase64

Install

npm i convert-multiple-files

Convert Word files

import { convertWordFiles } from 'convert-multiple-files';
import * as path from 'path';

async test() {
  // Return promise => convertWordFiles(path of the file to be converted, convertTo, outputDir)
  const pathOutput = await convertWordFiles(path.resolve(__dirname, 'teste.doc'), 'pdf', path.resolve(__dirname));
  console.log(pathOutput);
}

test();

Convert DOCX to HTML

import { convertWordFileToHTML } from 'convert-multiple-files';
import * as path from 'path';

async test() {
  // Return promise => convertWordFileToHTML(path of the file to be converted, outputDir, outputPrefix)
  const infoOutput = await convertWordFileToHTML(path.resolve(__dirname, 'file2.docx'), path.resolve(__dirname), 'filehtml-151412');
  console.log(infoOutput);
}

test();

Convert all files to Base64

import { convertToBase64 } from 'convert-multiple-files';
import * as path from 'path';

async test() {
  // Return promise => convertToBase64(path of the file to be converted)
  const base64 = await convertToBase64(path.resolve(__dirname, 'file2.docx'));
  console.log(base64);
}

test();
1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.2.1

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago