New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

doc-giggle

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doc-giggle

> Give me a docx/xlsx/pptx, I'll give you a pdf.

latest
Source
npmnpm
Version
2.0.3
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

doc-giggle

Give me a docx/xlsx/pptx, I'll give you a pdf.

Build Status semantic-release

Quality gate

Installation

npm i doc-giggle --save

Usage

Get pdf file stream directly

import { convert } from "doc-giggle";
import fs from "fs";

const pdfResponse = await convert("https://your-word/excel/ppt/url");

fs.writeFileSync("test.pdf", pdfResponse.body);

Caution: The download link is temporary and will be deleted by arbitrary time, so you should download and save it to your storage as quickly as you can.

import { convertByFcDocRotary } from "doc-giggle";

const { sourceFileUrl, pdfUrl } = await convertByFcDocRotary(
  "https://your-word/excel/ppt/url"
);

How

There are several backend servers work behind the scene, which use libreoffice's command line to convert the the office document into pdf file.

They are

Credits

This project was bootstrapped with TSDX.

Local Development

Install dependencies

pnpm i
# or
npm i
# or
yarn install

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

FAQs

Package last updated on 12 Mar 2020

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