Coder Social home page Coder Social logo

pdfpreview's Introduction

pdfpreview

Simple tool to generate thumbnails from PDF. It renders pages from input PDF beginning with first page to last page (inclusive) into one image. Pages are fitted into size specified as box width x box height and placed next to each other. Up to box max x pages can be placed in one row.

See make-samples.sh or examples section for usage examples and their results.

Dependencies

  • g++
  • pkg-config
  • libpoppler44 (maybe other versions will work, tested on 0.24.5 and 0.29.0)
  • libpoppler-dev

Compiling

Run ./build.sh in directory with pdfpreview to compile it.

Usage

PDF file is read from stdin and thumbnail image is written to stdout. Errors and messages will appear in stderr.

pdfpreview <box width> <box height> <box max x> [first page] [last page] [verbose]
  • box width, box height - Size of box in pixels, must be positive integer.
  • box max x - Number of pages to place in one row, must be positive integer.
  • first page - Optional, first page number to render. Pages are numbered from 1, which is default value.
  • last page - Optional, last page number to render, inclusive. Defaults to number of pages in the document.
  • verbose - Optional, prints usefull info to stderr. Use 1 to enable, 0 to disable (default)

Examples

All examples are generated from this PDF

pdfpreview 100 150 2

sample 1

pdfpreview 100 150 4

sample 2

pdfpreview 150 100 3

sample 3

pdfpreview 100 150 3 3 7

sample 4

pdfpreview 100 150 1 5 5

sample 5

License

Licensed under GPL v2

pdfpreview's People

Contributors

dzindra avatar foxlik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.