Skip to content

function61/pdfrasterizer

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.

About

A small microservice that rasterizes a PDF as an image file, use case: thumbnailing

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published