rf-api-thumbnail

0.5.2 • Public • Published

rf-api-thumbnail

Creates PNG Thumbnail picture from PDF files using gm. Takes a buffer or a stream from a PDF File and returns a PNG file buffer.

Getting Started

npm install rf-api-thumbnail

Create a Preview Pic

var services = require('rf-api-thumbnail').start();

// simple example
service.bufferToThumbnail(pdfBuffer, function(err, pdfPreviewPic){

})

// with rf-api
API.post('/pdf', function(req, res){

   // convert a pdf buffer from frontend
   Service.bufferToThumbnail(req.data, res.send);

})

Image utils

var services = require('rf-api-thumbnail').start();

// convert a tiff to a pdf
service.convertImageBuffer(tiffBuffer, 'PDF', function(err, pdfBuffer){

})

Development

Install the dev tools with

npm install

Then you can runs some test cases and eslint with:

npm test

Legal Issues

  • License: MIT
  • Author: Rapidfacture GmbH

/rf-api-thumbnail/

    Package Sidebar

    Install

    npm i rf-api-thumbnail

    Weekly Downloads

    5

    Version

    0.5.2

    License

    MIT

    Unpacked Size

    9.97 kB

    Total Files

    5

    Last publish

    Collaborators

    • dennissaka
    • felix_furtmayr
    • jochenh
    • ulikoehler
    • rf-bernhard
    • max_speedy
    • mitzenthaler