# clx-processfilestreams

> (如果是.doc可以转换成.docx的文档流，.xls 可以转换成.xlsx的文档流)

Latest version **0.0.4** (published 2023-09-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install clx-processfilestreams
pnpm add clx-processfilestreams
yarn add clx-processfilestreams
bun add clx-processfilestreams
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-09-22 |
| First published | 2023-09-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| Author | clx |
| Maintainers | chuxiaomei |

## Links

- npm: https://www.npmjs.com/package/clx-processfilestreams
- npm.io page: https://npm.io/package/clx-processfilestreams

## Dependencies (3)

- [xlsx](https://npm.io/package/xlsx.md) ^0.18.5
- [pdfjs-dist](https://npm.io/package/pdfjs-dist.md) ^3.10.111
- [docx-preview](https://npm.io/package/docx-preview.md) ^0.1.18

## Recent versions

- 0.0.4 (latest) — 2023-09-22
- 0.0.3 — 2023-09-22
- 0.0.2 — 2023-09-22
- 0.0.1 — 2023-09-21

## README

## 处理 .pdf /.docx /.xlsx 的文档流 
(如果是.doc可以转换成.docx的文档流，.xls 可以转换成.xlsx的文档流)

## 导入
import { ProcessFileStreamsDOCX } from 'clx-processfilestreams';
import { ProcessFileStreamsPDF } from 'clx-processfilestreams';
import { ProcessFileStreamsXLSX } from 'clx-processfilestreams';

##  ProcessFileStreamsDOCX(第一个参数为文档流，第二个参数为自己定义的id)

    <div id="docx"></div>

    // 接口获取文档流
      downLoadFile(id).then(res => {
        ProcessFileStreamsDOCX(res.data, 'docx');
      });

##  ProcessFileStreamsPDF(第一个参数为文档流，第二个参数为自己定义的id，第三个参数为页数(需要获取第几页的pdf))

    <canvas id="pdf"></canvas>

      downLoadFile(id).then(res => {
        ProcessFileStreamsPDF(res.data, 'pdf', page).then((res) => {
          // res为返回的总页数
        });
      });

## ProcessFileStreamsXLSX(第一个参数为文档流)

      downLoadFile(id).then(res => {
        // ProcessFileStreamsXLSX(res.data)的返回值为所需要的数据
        ProcessFileStreamsXLSX(res.data)
      });

---
_Source: https://npm.io/package/clx-processfilestreams · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
