Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiskolabs/pdf-burst
Bursts a PDF into single page files.
https://github.com/kiskolabs/pdf-burst
Last synced: about 5 hours ago
JSON representation
Bursts a PDF into single page files.
- Host: GitHub
- URL: https://github.com/kiskolabs/pdf-burst
- Owner: kiskolabs
- License: mit
- Created: 2010-05-28T09:31:15.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2010-06-30T14:37:09.000Z (over 14 years ago)
- Last Synced: 2024-10-29T00:20:38.334Z (9 days ago)
- Language: Ruby
- Homepage:
- Size: 97.7 KB
- Stars: 7
- Watchers: 22
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PDF::Burst
## What?
PDF::Burst is a gem that lets you split a PDF document with several pages into single page files.
## Why?
We needed this functionality for the development of [Lehtilompakko](http://lehtilompakko.fi/), and did not want any Java app to do the job.
## How?
Simple! Once you install the 'pdf-burst' gem, all you need is:
require 'pdf-burst'
PDF::Burst.new("/path/to/my/document.pdf").run!By default, the PDF files will be output to your current working directory. But that's not what you want, is it?
PDF::Burst.new("document.pdf", :output => "/tmp").run!
Better, huh?
Another default is the page name. They'll all be nicely named like "page_1.pdf", "page_2.pdf". We let you change that too:
PDF::Burst.new("document.pdf", :filename => "doc.%04d").run!
Would output them like this: "doc.0001.pdf", "doc.0002.pdf", etc.
If you want thumbnails to be generated for each page, just use the thumbnail option with the thumbnail size.
PDF::Burst.new("document.pdf", :thumbnail => "128x128").run!
This requires ImageMagick to be installed, as it uses the 'convert' command.
## Special thanks
Thanks to [Hopeinen Norsu](http://hopeinennorsu.fi/) for letting us release this as open-source.
## License
Check the LICENSE file. It's the MIT license.