pdfrasterizer

module
v0.0.0-...-cb3fe98 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2020 License: Apache-2.0

README

Build status

What?

A small microservice that rasterizes a PDF as an image file (use case: thumbnailing).

You can run this:

  • on AWS Lambda
  • with Docker
    • I didn't bother making a Dockerfile though, since I didn't need it. PR welcome!
  • as a standalone binary

There also exists a small client library for Go

Testing

You can start a local server process with:

$ pdfrasterizer server

Then call it from the client:

$ export PDFRASTERIZER_TOKEN="doesntMatter" # optionally you can put the service behind authentication
$ pdfrasterizer client-localhost example.pdf > example.png

You can also use raw curl:

$ curl -H 'Content-Type: application/pdf' -X POST --data-binary @example.pdf http://localhost/rasterize > example.png

Internals

Internally, it uses Ghostscript.

Directories

Path Synopsis
cmd
pdfrasterizer command
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL