Package Exports
- @raabbajam/pluto-pdf
- @raabbajam/pluto-pdf/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@raabbajam/pluto-pdf) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pluto-pdf
pluto-pdf
Install
npm i -S pluto-pdfUsage
const {Client, Server} = require('pluto-pdf');
const client = Client({
serverUrl: 'localhost:3002',
auth: 's3cret',
storageOptions: {
serverUrl: 'localhost:3003',
auth: 'miracle-',
},
});
const html = '<html>...</html>';
const type = 'citilink'; // default: custom. Look folder src/modules
client.convert(html, type) // promise
.then((stream) => stream.pipe(writeStream));
const links = ['http://example.com/asd.pdf', 'http://example.com/asd2.pdf'];
client.merge(links) //
.then((stream) => stream.pipe(writeStream));
const server = Server({
port: 3005,
auth: 's3cret',
storageOptions: {
serverUrl: 'localhost:3003',
auth: 'miracle-',
},
});
server.start(); // Promise
server.stop(); // PromiseUse docker-compose
git clone git@gitlab.pondokprogrammer.com:pluto/pluto-pdf.git
cd pluto-pdf
cp sample.env .env
nano .env
docker-compose up -d --build && docker-compose logs -fLicense
MIT © Raabb Ajam