Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.11 KB

README.md

File metadata and controls

66 lines (43 loc) · 1.11 KB

Just Want PDF

NPM Version

Just-Want-PDF is a package to help you to get PDF in node.js envrionment.
Takes in many files, marge them, and output a single PDF result


Demo Here

Accept input file types

.PDF .jpg .jpge .png

Output

Byte Array or Blob Object or File Object

Usage

install package npm i just-want-pdf

import to your project import converter from "just-want-pdf";

Convertion

Assumption

import converter from "just-want-pdf";
var fileList = [File1, File2, File3...];

to byte array const result = converter.toByte(fileList)

to blob const result = converter.toBlob(fileList)

to File const result = converter.toFile(fileList)

for display in iframe

    .....

    var result = convert.toBlob(fileList);
    const url =URL.createObjectURL(result);

    //use iframe to display url

    <iFrame src = {url} />

    ....