🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

convert-multiple-files-ul

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-multiple-files-ul

Convert files to other types

1.0.1
latest
Source
npm
Version published
Weekly downloads
200
0.5%
Maintainers
1
Weekly downloads
 
Created
Source

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-ul

Convert Word files

import { convertWordFiles } from 'convert-multiple-files-ul';
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-ul';
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-ul';
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();

Keywords

convert

FAQs

Package last updated on 20 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts