JSPM

@raabbajam/pluto-pdf

1.1.3
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3
    • Score
      100M100P100Q23752F
    • License MIT

    pluto-pdf

    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

    NPM version Build Status Coveralls Status Dependency Status Downloads

    pluto-pdf

    Install

    npm i -S pluto-pdf

    Usage

    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(); // Promise

    Use 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 -f

    License

    MIT © Raabb Ajam